123
(Taras)
March 9, 2022, 6:46pm
6
If context.id
is not null and context.user_id
and context.parent_id
are null then it’s (very likely) the physical device that was responsible for the trigger.
This should help you get started:
alias: Override Generic Thermostat
id: override_generic_thermostat
trigger:
- platform: state
entity_id: switch.your_heater
condition:
- "{{ trigger.to_state.context.id != none }}"
- "{{ trigger.to_state.context.parent_id == none }}"
- "{{ trigger.to_state.context.user_id == none }}"
action:
- service: "climate.turn_{{ 'off' if trigger.to_state.state == 'on' else 'on' }}"
target:
entity_id: climate.your_thermostat
When the heater switch…