If you have to… move the actions from the first automation to a script and have the automation call the script. Then the second automation can use the script.turn_off action.
Though, I would suggest reevaluating what you are actually trying accomplish… post your automation(s) config with a clear explanation of your goals and someone here will likely be able to help.
If you want one automation to influence the behavior of another automation, use a helper to act as a intermediary. As a basic example, one automation sets the state of an Input Boolean and the other automation checks the Input Boolean’s state (for on).
The core Automation that lower music player volume when Assist is triggered and set it back to initial volume (using variable) when Assist state became idle
2nd Automation that sets volume when I say “set volume 20%”.
You see that both automations are running at the same time and 2nd one would fail because 1st one would set initial volume back every time.
Your decision to separate volume control into two separate automations is proving itself to be problematic. Each handles a specific case of volume control but together they conflict.
I suggest you consider designing a single automation containing logic that handles all cases of volume control.
I have an automation to turn off all the lights when I leave my house.
I also have another automation to tell a bunch of different light in different rooms to go on and/or off based on time of the day & sunrise/sunset.
So I thought, OK, if I leave the house, shouldn’t I tell the 2nd automation to not bothering turning the light on or off…?
So, if we cannot tell automation #2 to stop, and turn the automation back on when I get back home… what is the alternative / what’s the better design approach here?
What is the recommendations here?
Geneuine question here. I learned about anti-pattern just now so not sure what else I should consider…? Do I merge the 2 automations into one?
No, it is not. Think of them like controlling a particular state in an FSM (Finite State Machine). I use this pattern a lot and i like how it is performing.