Trigger Automation - Prevent being triggered

I have a automation A that notifies me of movement. Most time it is fine to be triggered several times until I switch it off. In particular times I want the automation being turned off after the first trigger.

I created automation B that turns off the automation A - works :smiley:

Then I did not find a trigger for within B that fires on A firing. In forum I found to let A trigger automation B. That works, but too well. A triggering B even if B is turned off.

Now I search for a condition to be placed within B that it does not proceed if it was off, even if A triggers B. Of course also other solution are fine.

Good, because this sounds like an XY problem.

A better way would be to have a condition in A that prevents the action from running when you don’t want it to, then you don’t need B at all. Switching automations on and off is usually not the best way to work things. You don’t care if it triggers — but you do care if the action runs.

If you want more help, provide more details. Specifically, the correctly-formatted YAML for A as it stands, and a clear description of when it should and shouldn’t run.

It’s not that I don’t want A to run, it should only run once :wink:

Once ever, once per day, once until something else happens — what is the actual requirement?

Sorry for wasting your time, maybe this is helpful for someone finding the thread (<-edited) later

I found a solution, by means of yet another automation and helpers (input_boolean)

A switches input_boolean helper to ON always.
B triggers on state change to ON on input_boolean helper (and only does it if I switched that automation on). B also switches helper off after firing.
Automation C, for safety, is always on and fires whenever automation B is switched on. C ensures the input_boolean helper is OFF.

1 Like

Not a threat…I think you mean thread. Troon is a nice fellow :laughing:



once ever (after I switched automation B on). Next time I switch A and B on, again once ever.

Presumptuous. Would like to see gender stats for HA users, although I can have a good guess…

Sounds over-complicated. Could you not have automation A check that input boolean in a condition, and turn it off as its last action step, then you wouldn’t need B or C. Like one of those machines that pops an arm out from the lid to turn itself off…

1 Like

I’ll take the over :slot_machine:

1 Like

btw, I saw the original one that Shannon build while being at Bell Labs :slight_smile:

1 Like