I got Claude to write me some YAML that is supposed to turn off my Tado system when the temp gets 0.1 above the set point, but when I “test” the condition, it doesn’t work.
Any idea why?
alias: Heat limiter
description: >-
Turn off HVAC when temperature exceeds set temperature by more than 0.1°C for
1 hour
triggers:
- value_template: >-
{{ (states('sensor.8e4c58b83e45d87f7a6dc8e774c07fcd') | float) >
(states('climate.a87965720f374142d0a5300b88cb578f') | float + 0.1) }}
trigger: template
conditions:
- condition: template
value_template: >-
{{ (states('sensor.8e4c58b83e45d87f7a6dc8e774c07fcd') | float) >
(states('climate.a87965720f374142d0a5300b88cb578f') | float + 0.1) }}
actions:
- device_id: b0c1746b7fe78e5daf362a049fdf9710
domain: climate
entity_id: a87965720f374142d0a5300b88cb578f
type: set_hvac_mode
hvac_mode: "off"
- delay:
hours: 1
- device_id: b0c1746b7fe78e5daf362a049fdf9710
domain: climate
entity_id: a87965720f374142d0a5300b88cb578f
type: set_hvac_mode
hvac_mode: auto
mode: single
alias: Turn off HVAC when temperature exceeds setpoint by 0.1°C
description: >-
Turn off HVAC when the room temperature exceeds the setpoint temperature by more than 0.1°C.
trigger:
- platform: template
value_template: >-
{{ (state_attr('climate.living_room', 'current_temperature') | float) >
(state_attr('climate.living_room', 'temperature') | float + 0.1) }}
condition:
- condition: state
entity_id: climate.living_room
state: 'heat' # Check only if the HVAC is in heating mode
action:
- service: climate.set_hvac_mode
target:
entity_id: climate.living_room
data:
hvac_mode: 'off'
- delay:
hours: 1
- service: climate.set_hvac_mode
target:
entity_id: climate.living_room
data:
hvac_mode: 'auto'
mode: single