I need a trigger in an automation to push the set-temperature to my aircon.
When i change the temperature from my aircon i need it to send it to my aircon.
I have a script which i use to control my aircon, with a generic thermostat i can control the most. But he don’t push the set temperature to my aircon, so i need to use a trigger.
Now i have:
automation:
- alias: Push set-temp to aircon
trigger:
- platform: template
value_template: "{{ (state_attr('climate.aircon_woonkamer', 'temperature') | float * 10) | round }}"
action:
- service: script.push_setpoint_to_aircon
data_template: '{{ trigger.to_state.state }}'
This is my script:
push_setpoint_to_aircon:
alias: Setpoint to airco
sequence:
- service: shell_command.airco_set_temp
my shell_command.airco_set_temp:
airco_set_temp: 'bash /config/scripts/airco-script.sh set setpoint'
But HA don’t want to accept my automation.
Because he don’t accept ‘{{ trigger.to_state.state }}’ .