I have wall switch (wifi) in the room, it has ‘forget timer’ (it switch off after 1 hour). In same room I have installed a motion sensor (wifi). Both devices already connect to HA. The question is:
- how I can re-start forget timer by motion sensor?
- I’d like to switch light automatically (condition - dark or evening time) and have another timer - 5 min, but it works when I didn’t push wall switch, so it have to be blocked by wall switch and forget timer should works. How i can manipulate with two timers from different events?
So, in real life it should be like this - I come in to room and press the wall switch (cause I expect to read a book), but I come out to another room cause my friend comes to me - I will away from my room long time (I forget to switch light) - in this situation light should switch off after delay. But if I come back to my book the timer should restart and give me one hour till i will not sleep (will not moving and motion sensor will not detect any movements).
Another, situation - I come to room to take my book and read it outside - I don’t like to press switch and motion sensor should turn on light for a short time (if I will not use wall switch).
It was worked with my old automatics cause it had been wrote ‘hard style’ with c++. Now I’d like to modernise my HomeAutomation, but YAML and scripts make me creasy.
Please, help me with advise or example.