Set temperature on state event

Hello,

I got a couple of Danfoss LC-13 thermostats, which I would like to group together.

The idea is that I only have to change the thermostat on one of them, and then all of them should change to the same temperature.

Is this possible to do with a state event automation? And how? :slight_smile:

Best regards,
Mathias

Did you find a way to do this?

Yep, I did - but I ended up doing it with AppDaemon.

Here is my code;

import appdaemon.appapi as appapi

class AutoAdjust(appapi.AppDaemon):
  def initialize(self):
      if "heat_master" in self.args:
          for sensor in self.split_device_list(self.args["heat_master"]):
              self.listen_state(self.heatSync, sensor)

  def heatSync(self, entity, attribute, old, new, kwargs):
      for tstat in self.split_device_list(self.args["heat_slave"]):
          self.call_service("climate/set_temperature", entity_id = tstat, temperature = new)
          self.log("Heatsync called!")

And in the apps.yaml I put this code for each group I want to control;

heat_sync_stue:
  module: heatSync
  class: AutoAdjust
  heat_master: sensor.temperatur_termostat_sofa
  heat_slave: climate.danfoss_z_thermostat_014g0013_heating_1_2,climate.danfoss_z_thermostat_014g0013_heating_1_3