Thanks. And sorry I missed you had said ecobee and mentioned the hvac_action
attribute in your OP.
But it’s good to know the fan
attribute also seems to be useful here, and probably better than hvac_action
given how you said you’d want it to work.
I think something like this should do what you want:
- trigger:
- platform: state
entity_id: climate.home
condition:
- condition: template
value_template: >
{{ trigger.from_state is not none and
trigger.to_state is not none and
trigger.to_state.attributes.fan != trigger.from_state.attributes.fan }}
action:
- service_template: "homeassistant.turn_{{ trigger.to_state.attributes.fan }}"
entity_id: switch.FAN_BOOSTER
This assumes the fan
attribute always has the values of on
or off
.
The idea is, the automation is triggered whenever the state of climate.home
changes, including when only an attribute changes.
Then the condition checks to see if the fan
attribute has changed. If so, then the action will run.
The action uses a service_template
to determine whether the switch should be turned on or off, based on the new value of the fan
attribute. Of course replace switch.FAN_BOOSTER
with the actual entity ID of the smart plug that controls the booster fan.