Using another Temperature Sensor as a reference for my Thermostats

If it works, it can be reduced to this, although not sure what the set_temperature call to 0 is about?

alias: Handtuchheizung Test
description: ""
trigger:
  - platform: state
    entity_id: input_boolean.trv
action:
  - service: climate.set_temperature
    target:
      entity_id: climate.devolo_thermostat_09356
      data:
        temperature: >
          {{ (state_attr('climate.xhandtuch', 'temperature')|float + 5)
             if trigger.to_state.state == 'on' else 15 }}
mode: single

I don’t think anyone but you know what that climate entity is.
It’s not the same as the one in the automation, that one is named climate.devolo_thermostat_09356.

Now being at home, I checked and unfortunately the actual Danfoss heating device does not update/synchronize with the input I make using the automation and the created climate entity (generic Thermostat). Moreover taking a closer look at the device is strange enough, because it seems to give me two entities for each device.

 climate.devolo_thermostat_09356

and

climate.devolo_thermostat_09356_3

which looks like this in the device overview.
image
The info of these two items do synchronize and it also equals to that is shown in the display of the Danfoss device.
So what I have now is a nice automation which does not trigger anything. I know I could easily and more sophisticatedly do it with Better Thermostat but doing it the hard/manual way I am actually aiming to understand what is happening.
My current automation is this but still no improvement.

alias: Handtuchheizung Test
description: ""
trigger:
  - platform: state
    entity_id:
      - input_boolean.trv
    to: "on"
    id: "on"
  - platform: state
    entity_id:
      - input_boolean.trv
    to: "off"
    id: "off"
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - "on"
        sequence:
          - service: climate.set_temperature
            target:
              entity_id:
                - climate.devolo_thermostat_09356_3
                - climate.devolo_thermostat_09356
            data:
              temperature: "{{ state_attr('climate.xhandtuch', 'temperature') |float + 5 }}"
      - conditions:
          - condition: trigger
            id:
              - "off"
        sequence:
          - service: climate.set_temperature
            target:
              entity_id:
                - climate.devolo_thermostat_09356_3
                - climate.devolo_thermostat_09356
            data:
              temperature: 15
      - conditions: []
        sequence:
          - service: climate.set_temperature
            target:
              entity_id:
                - climate.devolo_thermostat_09356_3
                - climate.devolo_thermostat_09356
            data:
              temperature: 0
mode: single

Thank you so much for your patience.

Remove the device(s) and readd it.
If that to fails then submit it as a bug report, there shouldn’t be two devices like that.
I’m quite sure that is the issue.

Or its something with that type of TRV.

I couldn’t manage to set everything up manually so I decided to switch to Better Thermostat and use it there, which is working. Thank you for your help anyways.

I know this was resolved with a custom card, but you were on the right track with the input boolean and the generic thermostat. The issue I could see was the temperature setting of the actual real thermostat. As it takes it temperature still from the inbuilt sensor, it was idle because it thought it was at the right temperature. If this is for heating, you basically need to set the z-wave thermostat to its maximum temperature, then have the generic thermostat doing the on/off control. You would then set the zwave thermostat to be hidden so it was not visible and all changes would be done on the generic thermostat. So for a heating, you’d crank the zwave thermostat right up to 30 degrees Celsius or something crazy hot like that, then use the generic thermostat and and input boolean (As you can’t use Climate as an entitty for the Generic Thermostat) via the automation to basically turn the zwave one on and off, like a switch rather than a thermostat.
When I did mine with the generic thermostat years ago I would set the real thermostat to maybe 26 Celsius, and it would act as like an absolute max temperature / safety cut out in the event that the generic thermostat failed to operate. The input boolean, via the automation, would turn the real thermostat on and off at the set temperature in the generic, but I always had that safety of the real thermostat cutting out before it cooked us :slight_smile:

I’ve updated some thermostats since then so I don’t use generics any longer, except for the fishtank, but that is a smart switch as the tank heaters are mechanical, dumb heaters. I used the same principle though. Set the thermostat on the tank heaters to a maximum at the top end of the range the fish would survive in as a safety barrier in case Home Assistant failed, but using the generic thermostat to control the actual set point.

I would love to learn how you used Better Thermostat to use a different temperture sensor than the thermostat. That is EXACTLY what I am trying to do, but cant quite seem to make it work.

thanks!