Perfect Heating Automation with Sonoff TRVZB

intresting reading!

@berkans: as i am running a heatpump i am seeking just a possibility to open or close the valve on my sonoff trv - no need for anything in between ON and OFF. i am going with the climate-entity to set it to OFF and HEAT … is this correct or can i set the valve-opening directly?

Hi,
I’m looking for the best way to regulate the temperature using this valve.
Currently, I use the valve in “Heating” mode. Node-RED sends the desired value with this parameter “occupied_heating_setpoint”, but the valve operates in a fully open or fully closed state, which is not very efficient.

Has anyone tested or explored the possibility of regulating the progressive opening of the valve using the valve_closing_degree parameter?
With an external regulator and either the TRVZB probe or an external probe, could this parameter be used to progressively open the valve to achieve the desired setpoint temperature?

Yes, I’m using Versatile thermostat for that. It has progressive control and it can use external temperature sensor.

Yes I am using directly the valve position, together with PID controller
Works very well

I have similar situation as @MatcherMike discribed. When I enable TRV Calibration automation local temperature is starting to flicks when I change target temperature on better thermostat. Looks like conditions is all time false. I have to add (0) for float as @uz-it wrote because without it automation wan’t work. I disabled all reporting on TRV and without automation calibration is ramming stable. Any ideas why?

I’ve been using the Sonoff TRVZB since last week and also the Aqara external sensors.
I have developed a similar solution and would like to share it here because I had a similar problem where the two triggers kept triggering each other.

Sometimes the solution is so simple, I just added a 5 minute break at the end.

alias: Badezimmer Externer Sensor
description: ""
triggers:
  - trigger: state
    entity_id:
      - sensor.sensor_badezimmer_temperature
  - trigger: state
    entity_id:
      - climate.trv_bad
    attribute: current_temperature
    enabled: true
conditions:
  - condition: template
    value_template: "{{ has_value('sensor.sensor_badezimmer_temperature') }}"
  - condition: template
    value_template: "{{ has_value('number.trv_bad_local_temperature_calibration') }}"
  - condition: template
    value_template: "{{ state_attr('climate.trv_bad', 'current_temperature') != None }}"
  - condition: template
    value_template: |
      {{
        (state_attr('climate.trv_bad', 'current_temperature')|float(default=0) -
        states('sensor.sensor_badezimmer_temperature')|float(default=0)) !=
        states('number.trv_bad_local_temperature_calibration')|float(default=0)
      }}
actions:
  - action: number.set_value
    metadata: {}
    data:
      value: >-
        {{
        (states('number.trv_bad_local_temperature_calibration')|float(default=0)
        -  (state_attr('climate.trv_bad',
        'current_temperature')|float(default=0) -
        states('sensor.sensor_badezimmer_temperature')|float(default=0))) |
        round(1) }}
    target:
      entity_id: number.trv_bad_local_temperature_calibration
  - delay:
      hours: 0
      minutes: 5
      seconds: 0
mode: single

Links: https://github.com/Koenkk/zigbee2mqtt/discussions/24487#discussioncomment-11104159