Hi HA Community,

I do have one light bulb in my floor in three automations with each automation a different motion sensor (Screen below). It is an big open floor with the 3 sensors are distributed across the corners of the room.

Challenge:
I pass the first sensor and after couple of seconds the motion sensor detects no movement any longer (change of state) and the light will turn off after two minutes - like stated in the action/delay section of the yaml file.
Now, I would expect that the light is going to turn off after two minutes - but only when Iā€™m going to leave the room, passing no other of the three motion sensors. But obviously the ā€œmode: restartā€ option is not doing its job and it is still counting down the time from the motion sensor I passed first - so the light will turn off even after passing the second or third sensor. And than Iā€™m standing in the hallway, totally dark:).

How can I solve that so that the automations overwrite each other and stop their countdown or resetting their status after passing another of the 3 motion detector.

Thanks
Wolfgang

Have you consider grouping the sensors in Helpers so that any one sensor will act as all sensors?

I use this method in my bathroom and my kitchen because there are blind spots.

4 Likes

+1 to @LiQuid_cOOled 's suggestion that you should create a sensor group that treats it like a single sensor.

you might then also consider using this blueprint: YAMA - Yet Another Motion Automation (Scenes, Ambient Light and some Conditions )

the blueprint lets you specify scenes, which let you set the brightness to what youā€™d prefer. as well as day evening and night times and scenes to have different brightnesses.

you have a possible bug in your current implementation that you are restarting your 2 minutes only if you get another motion eventā€¦ which means if you keep a continuous motion for 2 minutes, the lights will shut off. usually the approach is to wait a period (2minutes in your case) after motion stops, not after motion detected is startedā€¦ again, because continuous motion will not necessarily trigger another motion event.

if you donā€™t wish to create a sensor group for some reason and also want to keep with your existing automation, you could also solve this by using 1 automation instead of 3. just put all 3 triggers in the trigger block of a single automation. that way any motion in any of them restart the same automation delay.

3 Likes

Thanks @LiQuid_cOOled and @armedad

Do you have a yaml excerpt maybe as an example since I do not know exactly where to out it in the file.

you have a possible bug in your current implementation that you are restarting your 2 minutes only if you get another motion eventā€¦ which means if you keep a continuous motion for 2 minutes, the lights will shut off. usually the approach is to wait a period (2minutes in your case) after motion *stops* , not after motion detected is startedā€¦ again, because continuous motion will not necessarily trigger another motion event.

Yes I can try that with the helpers after my yaml file works properly.

if youā€™re asking about how to create a sensor group that @LiQuid_cOOled suggested, no yaml needed. go here to helpers and choose, group then choose sensor group:

2 Likes

@tux1980

If you would like this to work you can only use one automation. For it to work well best to group your motion sensors as suggested above but you must use ā€˜binary sensor groupā€™ as that is what you have. If you are unsure how to do this I have a step by step guide for you. You then use that group as your trigger not the motion sensors entity ID. You can possibly get away not grouping them as you say your motion sensor clears in seconds and it is a big room but I would still recommend grouping them because more than 1 person may be in the room.

You can also use my :bulb: Sensor Light blueprint and use night lights to toggle between 60 & 40 % brightness. To get the blueprint just use the import blue button at the top and follow the instructions. Once done go into automatons / blueprints tab at the top and click on sensor light one.

Hope this helps you

Blacky :smiley:

2 Likes

Hi,

thanks, is working with the grouping of the binary sensors.
All solved here:)

thanks

glad itā€™s working!
should really mark @LiQuid_cOOled 's post as solution. itā€™s a small thing but the right thing to do.

3 Likes