Sonoff TRVZB Hysteresis Issue

Hi. I have a question: When a switch is ON; the climate temperature will be set to 30C and when the switch is OFF; the climate temperature will be set to 4C. But HA must monitor this state continiously not only result of a trigger. Let’s say I manually changed the heat setting, the automation should immediately kick in and set the heat to 30C or 4C. I think this is a combination of time pattern and template value condition but I don’t know how? I ask for your help. Best regards…

Woaw, opened this topic to see if I could help but to be honest, I stopped reading immediately and I guess others might do the same.

Reason: wall of text!

Hi. You are right. Please look again and help me.

Much better but I still don’t quite get what you want to achieve.

What kind of switch are you talking about?
The TRV itself has a switch that can be controlled.

How do you measure the temperature? With the TRV?

Why that time pattern?

1.Switch which is connected to the heater.
2.Measuring the room temperature with an external device.
This solved my problem. But not according to the switch. According to the HVAC ACTION of the generic thermostat.

  • id: ‘173343435828321’
    alias: Bedroom Radiator “Idle” then Bedroom Valve Target Temperature “8”
    description: ‘’
    triggers:
    • trigger: time_pattern
      seconds: /5
      conditions:
    • condition: template
      value_template: ‘{{ is_state_attr(’‘climate.bedroom_radiator’‘, ‘‘hvac_action’’,
      ‘‘idle’’) }}’
      actions:
    • action: climate.set_temperature
      metadata: {}
      data:
      hvac_mode: heat
      temperature: 8
      target:
      device_id:
      • 42f44264ce6b633ef28ba8cfe2c56a45 ## Sonoff Trvzb Device##
        mode: single

You can see the reason in my first long message. My heating system is not a central system. Combi heating system. When any of Sonoff Trvzbs has a hvac action as Heat, firstly the combi must be activated or vice versa. It is a long story. Thanks…