diff --git a/source/_integrations/tado.markdown b/source/_integrations/tado.markdown index 1f28245273d..1b09bda080c 100644 --- a/source/_integrations/tado.markdown +++ b/source/_integrations/tado.markdown @@ -178,13 +178,13 @@ automation: - sensor.temp_sensor_room - sensor.tado_temperature - # Check if the room temp is more than 0.5 higher than the tado thermostat reading + # Check if the room temp is more than 0.5 away from the tado thermostat reading condition. The sensors default to room temperature (20) when the reading is in error: condition: - condition: template value_template: > - {% set tado_temp = states('sensor.tado_temperature')|float %} - {% set room_temp = states('sensor.temp_sensor_room')|float %} - {{ (tado_temp - room_temp) > 0.5 }} + {% set tado_temp = states('sensor.tado_temperature')|float(20) %} + {% set room_temp = states('sensor.temp_sensor_room')|float(20) %} + {{ (tado_temp - room_temp) | abs > 0.5 }} # Work out what the new offset should be (tado temp less the room temp but add the current offset value) and turn that to a negative value for setting as the new offset action: @@ -193,9 +193,9 @@ automation: entity_id: climate.tado data: offset: > - {% set tado_temp = states('sensor.tado_temperature')|float %} - {% set room_temp = states('sensor.temp_sensor_room')|float %} + {% set tado_temp = states('sensor.tado_temperature')|float(20) %} + {% set room_temp = states('sensor.temp_sensor_room')|float(20) %} {% set current_offset = state_attr('climate.tado', 'offset_celsius') %} - {{ (-(tado_temp - room_temp) + current_offset)|round }} + {{ (-(tado_temp - room_temp) + current_offset)|round(1) }} ``` {% endraw %}