Page 1 of 1

Scenes checking the status of a device before switching

Posted: Wednesday 07 October 2015 20:00
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 1433 times

Re: Scenes checking the status of a device before switching

Posted: Wednesday 14 October 2015 23:13
by G3rard
Any ideas for this?

Re: Scenes checking the status of a device before switching

Posted: Saturday 12 December 2015 14:59
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