Scenes checking the status of a device before switching

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Scenes checking the status of a device before switching

Post by G3rard »

I am using 4 switches to set if I am Home, Away, Sleeping or on Holiday.
I control the status of these switches with 4 scenes. So if I activate the scene for Home then I turn the Home switch on and turn the Away, Sleeping and Holiday switch off.
But I am also using On and Off actions for these switches and with this solution there are always some off scripts executed although the switch was already off.

So my question is if it is possible to add a feature in a Scene that a device is only turned On or Off when it is not On or Off at that moment? I can image that this is not always handy, but in some situations it is.
I know this is possible with LUA, but I am wondering if this is possible using scenes and more users think this is usefull.

That would mean an extra checkbox in the Devices part something like below.
scenes.png
scenes.png (167.88 KiB) Viewed 1424 times
Not using Domoticz anymore
User avatar
G3rard
Posts: 669
Joined: Wednesday 04 March 2015 22:15
Target OS: -
Domoticz version: No
Location: The Netherlands
Contact:

Re: Scenes checking the status of a device before switching

Post by G3rard »

Any ideas for this?
Not using Domoticz anymore
Pjedr
Posts: 39
Joined: Friday 27 December 2013 3:13
Target OS: Linux
Domoticz version: Beta
Location: Friesland
Contact:

Re: Scenes checking the status of a device before switching

Post by Pjedr »

I noticed that too. Maybe it can be implemented by one of the coders.

I worked around this by not using scenes, but dummy switches, and lua scipt code like:

Code: Select all

if devicechanged['ThuisAvond']=='Off' then
 if (otherdevices['Keuken SpotVerlichting']=='On') then commandArray['Keuken SpotVerlichting']='Off' end
 if (otherdevices['WoonKamer SpotVerlichting']=='On') then commandArray['WoonKamer SpotVerlichting']='Off' end
end


Last bumped by G3rard on Saturday 12 December 2015 14:59.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest