My lights won't turn on on presence, when they just have turned off

I have automation that switches lights on on presence detected and switches off after 10 minutes of presence lost.
When I enter the room at the same time as this automation turns lights off, they won’t turn back on again.
What’s the best way to deal with such problem? Switch automation mode to Queued? Add wait before turning lights on?

thanks

ps
its a single automation that tracks both presence lost and presence detected and then I have Choose block to switch lights off or on

There is a guide for that. See the Automation section of this Index

The Home Assistant Cookbook - Index.

2 Likes

Sounds like your motion light duration n is too short and it’s in conflict with the motion trackers blind window. Check your device. Most motion devices have a blind window - the time after a trigger where a device won’t send another trigger to prevent race conditions.

If your motion automation isn’t taking that into account make sure the light stays on at least as long as the blind window to prevent the exact problem you’re hitting

2 Likes

If the motion sensor has an adjustable blind window, you can remove the wait time in the automation and use just the blind window.

You said this was detecting presence. So, just confirming, is this a motion sensor or a presence sensor?

2 Likes

This sounds like a motion sensor. In any case that’s how it’s behaving…

No…restart mode
as mentioned in the cookbook (for sensors that don’t support ‘off’)

1 Like

It’s aqara fp2 and fp1 presence sensors. I put them in sensors group and tracking it’s status.