Hi,
I have an automation with multiple triggers. For deciding which action I need to take, I need to check which of the trigger fired the automation, but can’t find a solution. With the code below, while changing the temperature (1st trigger), the {{trigger.to_state.state}} always return the one of the second trigger.
alias: _test
description: >-
Thermostat_1 is master and updates thermostat_2 if mode or target temperature
move.
trigger:
- platform: state
entity_id: climate.thermostat_salon_1
attribute: system_mode
enabled: false
variables:
triggermsg: set_preset_mode
- platform: state
entity_id: climate.thermostat_salon_1
attribute: temperature
variables:
triggermsg: set_temperature
condition: []
action:
- service: notify.admin_phones
data:
message: "{{triggermsg}}-{{trigger.to_state.state}}"
mode: single
Any idea of how I could solve this?
thanks.