Tado set offset using separate temperature sensor

Set tado offset using other temperature sensor

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Temperature difference

Tado valves often measure a temperature that is off by a few degrees. This is because it’s measuring the temp real close to the radiator.

If you have another temperature sensor located in that room you’d like to use that as source.

Tado offset

Luckily Tado has an offset you can set per device, which allows you to tell the Tado that the room temp is off by a few degrees.

This blueprint will set the offset (temperature difference) on a Tado device, using another temperature sensor as source.

When either sensor changes, the automation is triggered.

Logs

As it sucks to not see what’s going on, this blueprint will log:

  • info message that it has set an offset.
  • debug message with all the values

You can set the debuglevel in your configuration.yaml like so:

logger:
  default: error
  logs:
    blueprints.tado.offset: debug

Devices needed

You’ll need a Tado (obviously) and a separate temperature sensor.

Changelog

2021-07-08 Checking if source sensor is not null, as this could mean that it is offline.

Code

blueprint:
  name: Tado temperature offset
  description: Ensure the Tado smart valve has the temp of a separate sensor
  domain: automation
  input:
    source_temp_sensor:
      name: Source Temperature sensor
      description: This sensor will be used as the source.
      selector:
        entity:
          domain: sensor
          device_class: temperature
    target_tado:
      name: Tado
      description: The Tado to set the offset on.
      selector:
        entity:
          domain: climate

variables:
  target_tado: !input target_tado
  source_temp_sensor: !input source_temp_sensor
  tado_temp: "{{ state_attr(target_tado, 'current_temperature') | float }}"
  current_offset: "{{ state_attr(target_tado, 'offset_celsius') }}"
  actual_temp: "{{ states(source_temp_sensor) | float }}"
  offset: "{{ ( actual_temp - tado_temp ) | round }}"
  calculated_offset: "{{ ( ( actual_temp - tado_temp ) + current_offset ) | round }}"

trigger:
- platform: state
  entity_id: !input target_tado
  attribute: current_temperature
- platform: state
  entity_id: !input source_temp_sensor 

condition:
- condition: template
  value_template: "{{ offset != 0 }}"
- condition: template
  value_template: "{{ actual_temp != 0 }}"

action:
- service: system_log.write
  data:
    message: >
      {{ target_tado }} has temp difference of {{ offset }}. Setting offset to {{ calculated_offset }}
    level: info
    logger: blueprints.tado.offset
- service: system_log.write
  data:
    message: >
      target: {{ target_tado }} 
      source: {{ source_temp_sensor }}
      temp difference: {{ offset }}
      actual_temp: {{ actual_temp }}
      tado_temp: {{ tado_temp }}
      current_offset: {{ current_offset }}
      calculated_offset: {{ calculated_offset }}
    level: debug
    logger: blueprints.tado.offset
- service: tado.set_climate_temperature_offset
  data:
    offset: "{{ calculated_offset }}"
    entity_id: "{{ target_tado }}"
mode: single
2 Likes

For the ones who just want to take a look :wink:

Yeah, didn’t finish the post properly :wink:
Added some more info.

Thanks, this is just what I was looking for! However, I’m getting the following error when trying to add the automation based on your blueprint. Any idea what might be causing this?

Error rendering variables: TypeError: unsupported operand type(s) for +: ‘float’ and ‘NoneType’

Nice Work!
What would be really great is an adoption for the Eurotronic Spirit Thermostats.
These are also widely spread and have the same issue. Working with Offset and an external Senor is the best solution … Should be minor to adapt … But not with my skills :wink:

Thank you very much, it works perfectly.
For monitoring and testing, I put a card with an attribute in lovelace where I can see how the offset changes over time.

Hmmm, perhaps your sensor doesn’t provide a correct value? What are you using?

I have exactly the same. Nice to see it still works and now much the offset is sometimes.

I’m using a couple of Xiaomi Mijia temperature sensors (LYWSD03MMC) connected via BLE to an ESP32 running ESPHome. Testing one of the sensors using your script. I’m getting in stable temperature readings from the sensor, but the error appears to indicate either the Tado or the Mijia data are not recognized by the automation.

@JeroenB
I’m using a couple of Xiaomi Mijia temperature sensors (LYWSD03MMC) connected via BLE to an ESP32 running ESPHome. Testing one of the sensors using your script. I’m getting in stable temperature readings from the sensor, but the error appears to indicate either the Tado or the Mijia data are not recognized by the automation.

Have you tried it out in the template section of HA?

Replace target_tado and source_temp_sensor with the entity_id of your devices

{{ state_attr(target_tado, 'offset_celsius') }}

{{ states(source_temp_sensor) | float }}

Hi,

thanks for this!
My HA is not calculating? Anyone knows why?

message: >-
  target: climate.buro  source: sensor.netatmo_homenet_buro_temperature temp
  difference: 0 actual_temp: 22.4 tado_temp: 22.6 current_offset: 0.0
  calculated_offset: 0

Greets Mike

First of all, thanks a lot for the blueprint, it works great! I’ve implemented my own ‘Open window sensor’ using Aqara’s window sensors, which shuts of the thermostat when the sensor state changes. However, the two automations don’t work alongside each other, as the offset ignores the shutoff thermostat. Therefore, I was wondering if it’s possible to implement a condition in your blueprint, that checks if a certain condition is met?

I also wanted to thank a lot for the blueprint and I have another request. Due to the nature of the blueprint I can see that the radiator temperature is frequently adjusted during the days. I have heard that this temperature adjusting actually consumes quite some battery of the radiator valves. Would it be possible to trigger the automation only when the heating is started? I do not care that the radiator temperature valve is off when the radiator is turned off but would like only to be triggered when the radiator valve is in function. I hope it makes sense. In this way for instance, I do not have to disable the automation in summer when for sure the valves will not be used.