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
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.
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.
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.
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…