Read value from tado and pass it to another thermostat

Hi all,
i’m new to Home Assistant and tried several other approaches beforehand (Domoticz, homee, Homey).
In Homey it was quite easy to write and read variables in automations (flows).
That way it was possible to read the target temperature from one Thermostat (tado), store it into a variable and then set the same value as target for another thermostat.
How could i realise this in home assistants automations, if i don’t wan’t to use IFTTT?

Thank you guys in advance!

Philipp

Was easier, than it thought :slight_smile:

I just had to create a template-entity, which stores the target-temperature (sensor.wohnzimmer_target_temp)

- id: '1550751118126'
  alias: Temperatur angleichen
  trigger:
    platform: state
    entity_id: sensor.wohnzimmer_target_temp
  action:
  - service: climate.set_temperature
    data_template:
      entity_id: climate.eurotronic_eur_spiritz_wall_radiator_thermostat_heat
      temperature: '{{ trigger.to_state.state }}'

I had prepared a response, and was about to post it, and then discovered you had already solved it on your own! Congratulations! :slight_smile:

I’ll share what I prepared in case others would like a detailed explanation of the process.


This example assumes you have two thermostats:

climate.thermostat1
climate.thermostat2

When you change the target temperature of thermostat1 you want it to also set the same temperature for thermostat2.

To make things easier, we create a template_sensor that monitors the temperature attribute of thermostat1. This new sensor’s entity_id is sensor.thermostat1_temperature.

sensor:
  - platform: template
    sensors:
      thermostat1_temperature:
        entity_id: climate.thermostat1
        value_template: "{{ state_attr('climate.thermostat1', 'temperature') }}"
        friendly_name: "Thermostat1 Temperature"

Now we create an automation that triggers whenever sensor.thermostat1_temperature changes state. The automation’s action: will set thermostat2’s temperature to be the same as thermostat1’s temperature.

automation:
  - alias: 'Thermostat Synchronizer'
    hide_entity: true
    trigger:
      platform: state
      entity_id: sensor.thermostat1_temperature
    action:
      service: climate.set_temperature
      data_template:
        entity_id: climate.thermostat2
        temperature: "{{ states('sensor.thermostat1_temperature') | float }}"

NOTE:

After restarting Home Assistant, thermostat2’s temperature will not be the same as thermostat1. It will be the default temperature (21 C). To fix this, you can add a second automation that runs shortly after Home Assistant starts and executes the Thermostat Synchronizer automation.

- alias: 'Run Thermostat Synchronizer'
  hide_entity: true
  trigger:
    - platform: homeassistant
      event: start
  action:
    - delay: 00:00:05  # Wait 5 seconds
    - service: automation.trigger
      entity_id: automation.thermostat_synchronizer
2 Likes

Thank you very much for your answer!
Anyway, this is pretty much the same i did :grinning:

Thanks also for the hint with the second automation.

Regards

1 Like