Newbie here is pretty happy of all he did with HA in one year, almost everything works great now
I do have a simple issue since the beginning with my automations.
i have in bathroom, hallway and kitchen an automation that detects someone and lights on for 5 min. The problem is sometimes you want to trigger it again on purpose, but you do need to wait because it doesn’t work for a long minute or so. And I don’t get why.
My rpi is connect to the 2 Philips Hue hub that control the zigbee devices : in wall switches, bulbs and hue motion detectors.
I’d like that after an automation ends (light is off after 5 min), any movement can trigger the automation again (instead of waiting a minute or so).
Most motion sensors have a “cooldown” period during which they are unresponsive. Combine that with an extended delay as you have, and you will occasionally have periods where the light turns off but the sensor is unresponsive. In some cases you can prevent this happening by simply changing the mode of the automation to restart instead of single. However, you will probably have a better experience if you use separate triggers for turning the light on and off:
I tried to adapt your recommendation and it seems to work thank you so much but there’s a but : I need, before the automation goes on, to check if the light is already on.
This is why : I have hue wall switches anywhere.
For example : If I switch on the light of the bathroom because I want to shave, I’ll have full lights for all the time I need so I don’t want the automation to trigger.
This automation is just supposed to work at night when I go to the bathroom a couple of minutes, quietly with low lights, which will go off automatically.
In the yaml below I have set the condition that the light must be off but in facts it prevents the automation to shut down the light after the initial 5 minutes.
For the moment i disabled this condition. Also all my Hue devices must remain handled by the Hue Hub.