Page 1 of 1

action of scene depending on switch state

Posted: 08 Feb 2020 15:22
by HeHa
Hi,

I use EventWatcher to turn off lights based on Astronomy and Presence modules.
I want to turn off another switch (TV) 5 minutes later if the lights are still off.

How to implement? Logical Rule module should be able to, but does not work for me.


/HeHa

Re: action of scene depending on switch state

Posted: 09 Feb 2020 11:06
by PoltoS
There is a delayed scene app. You can trigger it from other apps

Re: action of scene depending on switch state

Posted: 09 Feb 2020 17:26
by HeHa
Hi,
PoltoS wrote:
09 Feb 2020 11:06
There is a delayed scene app. You can trigger it from other apps
Yes thank you. What I am then missing is the dependency of the light switch?


/HeHa

Re: action of scene depending on switch state

Posted: 15 Feb 2020 17:03
by PoltoS
You can use logical rules to trigger scene on button press

Re: action of scene depending on switch state

Posted: 19 Feb 2020 00:23
by HeHa
when scene is triggered, I want to turn off device B but only if device A is off.

Re: action of scene depending on switch state

Posted: 19 Feb 2020 02:57
by micky1500
This is how I would do it.
it might work :)


Create 2 App - Dummy Devices
Binary Switch DummyA and DummyB

Create App - Automated Switch Off
Switch off DummyA after 300 seconds

Create Rule in 'Automation-Rules' Add. New.
IF - (Turn on Advanced settings at bottom)
Nested Condition (AND)
if DummyA = Off (5 minutes has expired)
if DummyB = On (EventWatcher was triggered)
if Lights = Off (Lights are off)
THEN
Turn OFF DummyB
Turn OFF TV
ELSE
Disable Reverse Event

In EventWatcher
Turn Off Lights (as already doing)
Also in same Event
Turn On DummyA
Turn On DummyB
...


DummyB is used to prevent normal light switching on/off from triggering false TV changes.

Does seem a bit complicated to turn off a TV tho.

Micky

Re: action of scene depending on switch state

Posted: 13 Sep 2020 20:48
by HeHa
I soleved this eventually by using the app "Event Button" (https://github.com/maros/Zway-EventButton/).
When "Presence State" switches to "Night", then I use "EventWatcher" to turn off the lights immediately and another "EventWatcher" turns off TV with 2 minutes delay.
The delayed EventWatcher to turn off the TV has a "Cancel Event" which is an event setup in app "Event Button", so I can now trigger this software button to generate an event which cancels that the TV turns off.
I have set a rule that when the light switch is turned ON, then the event from app "Event Button" is triggered and hence cancels that the TV turns off.
This means that when I am watching a late movie and the lights go off, then all I have to do is to switch the lights back on and the TV will remain on. :D