-
-
Save niro1987/4e49117075cd4b66975e0ecfe3ad72b5 to your computer and use it in GitHub Desktop.
Hey @cylonr you can remove line 63, and should work as you want.
Nice automation. Do you have any good examples how to add motion sensor to it which is not in conflict with remote? I mean, remote always overwrites motion trigger and don't shut off the light if it was manually turned on.
@al13nus You could create a helper input_boolean
that you turn on/off together with the light, but only if the remote is the trigger. If the motion sensor is the trigger, you add a condition checking that the helper is off, and only turn the light off if the helper is off. That way, if the helper is on, the motion sensor will not turn the light off.
It does mean that the 'overwrite' is only valid for a turned on light, if the light is off, it will always be turned on by the motion sensor.
Good idea, will try it out. Thanks!
I combined your 2 button script and motion sensor and getting funny behaviour: so if he tells every time automation is triggered without buttons, that Error: In 'template' condition: UndefinedError: 'dict object' has no attribute 'event'
. BUT if you click on a button, then he finds event data and everything is fine. At the end everything works anyway.
Hi :)
Thansk 4 your work :)
It´s possible to when i turn on the light, it will keep the last dimm %?
thanks