Motion sensor controlled light won't turn off again

Hi,
I created an advanced flow, where I have 2 motion sensors in my bathroom. This turns on a lightstrip and controls the light level according to the time and sunset/rise. This all works, but the function to automatically switch off the lights after 30 seconds of inactivity is not working. Could anyone help me find out why?

Thanks

1 Like

Make your bathroom a zone, switch on all light of that zone when the zone is active and switch of the lights when the zone is not active there for x seconds or minutes.

After the presence sensor 1 inactiv trigger you have to check if åresence sensor 2 is inactive. After the presence sensor 2 inactive, you havd to check if the presence sensor 1 is inactive. And the All block have to be a Any. The reason is that the precense sensor do not get inactive at the same time, therefore the All block will never get true.

This is my guess for what is wrong.

1 Like

I agree with @Marius_Stensrod.

If you want to use the zone function as @Rmb suggested, then only the 2 motion sensors should activate the zone. If you have e.g. door/window sensors in this zone, then they have to be excluded from the zone activity. Furthermore it’s not possible to set a time of 30 seconds with this zone function. The shortest time is 60 seconds.

Another possibility is to use the app < group > to group the 2 motion sensors into 1 device. Then the cross-checking of the motion sensors, as Marius described, is no longer needed.

Thank you Marius, that did the trick!
I did suspect that maybe the motion sensor dactivation signal is only an impulse, not an enable function, and that’s why they never are able to engage the ALL block. Is that why it doesn’t work like that?

1 Like

Yes, that is correct. Every trigger action in Homey is just impulses. If you have numerous signals/conditions you have to check after a trigger, the all block can be useful to minimize the overall length of a flow, visually, basically “clean it up”. You can then build the flow in height, and not just the length.

1 Like