This is a bit of a head scratcher for me.
I am moving stuff from other systems all into home assistant.
For some strange reason, the lights turn on, and immediately off again.
I have a Hue Motion sensor in a room and I want to switch the lights on when motion is detected.
Easy I thought. Trigger is any status change on the sensor, so that I can work with "choose" in the automation and do not have to create individual ones for on and off.
The behavior of the sensor entity is correct, it goes to "detected" immediately and to "none" after a few seconds.
Under "Actions" I added a "choose" and have two conditions:
- If the day/night object (a binary) in my house is 0/day and the status of the motion sensor is "detected" then I turn on three lights
- If the day/night object is 1/night and the status is "detected" I turn on only one of the lights
- Initially I added another option that switches off the lights, when the status is "none" but I already removed that when I tried to debug this issue.
The traces show that "option" 1 is executed, which only uses light.turn_on, but it also states that it turned the lights off.