For some weeks now I have been trying to add a manual override to my bedroom lights. I just cant wrap my head around the logic and keep biting my own tail.
My theory is that I should be able to detect if a light was turned on manually. Because then the motion sensor would then just have turned on.
My motion setup is basically as follows:
* Triggers on motion and turnes on lights, sets a variable and set the timer duration
* When motion sensor reports of a timer is started
* If motion again is detected and the variable above is true, timer is paused.
* If timer expires the lights is turned of and variable is set to false
My goal now is to detect that any light is turned on or off manually and then set timer to a new value and block motion until timer expires.
* I have tried to use the Persistence Timer from Timed Devices plugin to ignore fast manual changes. (fast on / off)
* I have tried to use a group trigger to detect when any light is turned on / off
* I have a Activity Timer from the Timed Devices plugin that turnes on if motion is detected. I use this to detect if the lights was turned on automatically (Motion triggered light sensor)
My goal is to have automatically controlled lights most of the time, and then if lights is forced on or off it should stay that way until the timer expires with a longer time than when triggered automatically.
Can anyone point me in the right direction?