Hi HA community,
I’m new to HA and have been trying to read up on different aspects of how HA works and searching the web for an answer to avoid posting unnecessary questions. Some automations I’ve managed to figure out myself but this one I can’t seem to get right and I’m not sure what I am doing wrong.
The aim of the automation is to start the fan associated with my Nest thermostat when the temperature difference between my Nest thermostat and a LG split system AC (added to HA via HACS ‘SmartThinQ LGE Sensors integration’) exceeds say 3 degrees Celsius.
This is the code I am using (this is inside the automations.yaml file):
- id: 'turn nest fan on when temperature difference'
alias: Turn Nest fan off on temperature difference
trigger:
- platform: template
value_template: "{{ abs(states.sensor.guest_room_ac_room_temperature -states.sensor.living_room_thermostat_temperature) >= 3 }}"
action:
entity_id: climate.living_room_thermostat
service: climate.set_fan_mode
data:
fan_mode: 'on'
I don’t believe there is an issue with the action part of the script because if I change the trigger to a time based trigger, the automation works.
Any help is most appreciated.
Kind regards
Ulf