Is it possible to have one automation have a condition that is specific just to one action out of multiple actions?
For example if I had an automation called welcome home, that had a single trigger based on occupancy but two actions… One action I always want to fire such as a welcome notification, and a second action of turning on a light, but only if it is after sunset?
You could have the action call a script. Then, in a script, you can place conditions within the sequence. The first time you hit a condition that tests false, the script halts. So, some pseudocode:
action:
welcome notification
condition: is the sun below the horizon?
turn on a light
So the light would only turn on if the sun is below the horizon.
(aside: Can you put conditions in the action block of an automation? I don’t think I’ve tried that - my code only has conditions that halt the entire automation…)