Question about automations that fail conditions

If i have a trigger that checks for a motion sensor to go from ‘on’ to ‘off’, when it triggers and it is in state off, will it check it again later for the on to off state? or will it not fire again until the state changes back to on again (and waiting for off).

I’m asking because i have a motion sensor in an automation that turns off the shower lights but only when the shower is not in use (condition). Would that make the automation not trigger again once it triggered from on to off but failed the condition? Or would it keep trying until the condition succeeds ?

I am unclear on this. Hope this makes sense.

Thanks!

The trigger needs to go from false to true before it will trigger.

If the conditions aren’t met at that instant in time then the actions won’t run.

The trigger needs to go back to fslse then to true again before it will re-trigger.

The automation doesn’t wait for the conditions to be true. If they aren’t true when the trigger occurs then the autimation halts.

1 Like

I would suggest to have 2 triggers:

  1. Motion stopped
  2. Shower is off for a few seconds

And then 2 conditions (and maybe more if needed):

  1. Motion is off
  2. Shower is off

With this you will check for the conditions not only when the motion stops, but also when the shower goes off.

Hmm seems like i’ve been thinking about this wrong. The PIR of course sees me again at some point and it will again restart the automation. I guess the only case is if somehow i jump out the room and it fails to see me, but that, or run really fast, is an edge case that is unlikely to happen often.

Thanks for that, that was really useful.

I will have a think about this, thanks.

Sadly, many of my automations have this setup, triggers and conditions are almost similar if not identical. I was thinking it is only me, apparently not :slight_smile:

When tv was turned off, if family is not in living room, turn off lights.

The problem arises, if family is there, lights will not turn off automatically.

I changed it into;
When tv was turned off or family moves outside of living room, if tv is turned off and family is not in living room, turn off lights

1 Like