Say you have an input_select full of house modes, and two automations that react to changes in house mode. One triggers when you leave “Away”, and one when you enter “Evening”.
What happens when you change the mode from “Away” to “Evening”? I assume it’s just a flip of a coin which one gets run first, since only one “state_changed” event fires and multiple triggers qualify.
leaving_away_mode:
trigger:
- platform: state
entity_id: input_select.house_mode
from: Away # Leaving away mode
action:
- data:
message: "No longer away"
service: notify.mobile_app
entering_daytime_mode:
trigger:
- platform: state
entity_id: input_select.house_mode
to: Evening # Entering evening mode
action:
- data:
message: "Mode set to Evening"
service: notify.mobile_app
mode: single