Generic thermostat and Z-wave keep-alive not switching off?

Problem
The problem is that my generic thermostat will not turn off the heating when the target temperature goes below the current temperature. It does however turn on the heating once the target tempersature is higher than the current temperature.

Background
I managed to get my Z-wave boiler switch working. Single channel device acting as a relay for my boiler.

The HA+ZwJS ecosystem has created two entities. An on/off switch for the Binary_Switch command and a switch for the ‘SET THERMOSTAT’ command. It’s the latter I wish to make use of in HA because if has the crucial failsafe. The failsafe is such that the SET command must be sent/set/triggered (call it what you will) every 50 minutes or the switch will turn off. So this is a keep-alive mechanism also.
The SET command also acts as a switch and thus SET is both the on/off and the keep-alive.

I can control the boiler on/off using this SET command by adding the entity card and clicking on the OFF/HEAT button. However, the fail-safe needs the HEAT to be sent once every hour. So leaving the HEAT on won’t cut it. I could click OFF then HEAT every 60 minutes but that sucks. Enter Generic Thermostat.

Generic Thermostat
I setup the following configuration, the principle intent here is to get the keep-alive working and sending the HEAT command every 50 minutes, and of course operating as a typical thermostat:

thermostat:
  climate:
    - platform: generic_thermostat
      name: Thermostat
      heater: climate.secure_rf_zone_2_thermostat_mode_set
      target_sensor: sensor.meter_plus_88d5_temperature
      unique_id: generic_thermostat_kitchen
      min_temp: 5
      max_temp: 21
      target_temp: 5
      keep_alive:
        minutes: 50
      initial_hvac_mode: 'off'
      comfort_temp: 19
      away_temp: 5

Entities

  1. climate.thermostat (the generic thermostat)
  2. climate.secure_rf_zone_2_thermostat_mode_set (the z-wave SET command)
  3. sensor.meter_plus_88d5_temperature (room temperature sensor)

Startup Behaviour:

  • climate.secure_rf_zone_2_thermostat_mode_set = OFF. Correct!
  • current room temp sensor is sending 19C. Correct.
  • generic thermostat card shows 19C current temp. Correct!
  • generic thermostat card shows target temp set to 5C. Correct.
  • click the Heat button on the card. Boiler stays off. Correct!
  • turn up target temp to 25C. Boiler comes on. Correct!
  • climate.secure_rf_zone_2_thermostat_mode_set = HEAT . Correct!
  • turn down target temp to 5C. Boiler stays on. INCORRECT!
  • climate.secure_rf_zone_2_thermostat_mode_set = HEAT. INCORRECT!
  • click OFF on generic thermostat card. Boiler stays on. - -
  • climate.secure_rf_zone_2_thermostat_mode_set HEAT. INCORRECT!

Logbook

  • climate.secure_rf_zone_2_thermostat_mode_set (the z-wave SET command) shows the HEAT correct setting when I ramped up the target temp on generic thermostat card, but when I clicked the Off button or dragged the temp down to 5C, it still stays at HEAT and logbook shows no change in activity.

I just don’t get it. It seems simple enough to setup. I’ve clearly got something wrong. I have no automations or scripts or anything else using or reading these sensors. This is the first config I am trying to set up.

Where have I gone wrong?

EDIT:
here is a log (after I figured out how to get this)


I DIALLED UP THE TARGET TEMP TO ABOVE THE CURRENT TEMP AND THE BOILER CORRECTLY COMES ON...

2023-10-23 22:09:02.208 INFO (MainThread) [homeassistant.components.generic_thermostat.climate] Turning on heater climate.secure_rf_zone_2_thermostat_mode_set
2023-10-23 22:09:02.326 DEBUG (MainThread) [homeassistant.components.zwave_js] [climate.secure_rf_zone_2_thermostat_mode_set] Value mode/None changed to: 1
2023-10-23 22:09:07.424 DEBUG (MainThread) [homeassistant.components.zwave_js] [climate.secure_rf_zone_2_thermostat_mode_set] Value mode/None changed to: 1

I THEN DIALLED DOWN  THE TARGET TEMP BUT NO ACTIVITY , UNTIL I SWITCHED OFF THE BOILER USING THE ZWAVE ENTITY ITSELF....

2023-10-23 22:09:14.322 DEBUG (MainThread) [homeassistant.components.zwave_js] [climate.secure_rf_zone_2_thermostat_mode_set] Value mode/None changed to: 0
2023-10-23 22:09:19.393 DEBUG (MainThread) [homeassistant.components.zwave_js] [climate.secure_rf_zone_2_thermostat_mode_set] Value mode/None changed to: 0

Bump!
Anyone - please - have a clue. I went to a deal of effort to get as much information into this post and ask a good question. Surely there is someone out there who knows why this simple config is not working - it will be something i’ve done wrong.

After much debugging, trial and error, I discovered a lack of understanding as to how components and services work. My config was all wrong.
For anyone reading, who wants to control a fail-safe boiler that needs a “keep alive” with generic thermostat, here is the yaml. The solution requires the climate entity, some automation, and an input_binary heater switch [I couldnt get any other type to work].

  climate:
    - platform: generic_thermostat
      name: Thermostat
      heater: input_boolean.thermostat_heater_switch
      target_sensor: sensor.meter_plus_88d5_temperature
      unique_id: generic_thermostat_kitchen
      min_temp: 5
      max_temp: 21
      target_temp: 19
      keep_alive:
        minutes: 50
      initial_hvac_mode: 'off'
      comfort_temp: 19
      away_temp: 5

  automation:
    - alias: "Send SET HEAT to boiler"
      initial_state: on
      trigger:
        - platform: state
          entity_id: input_boolean.thermostat_heater_switch
          from: 'off'
          to: 'on'
      action:
        - service: climate.set_hvac_mode
          entity_id: climate.secure_rf_zone_2_thermostat_mode_set
          data:
            hvac_mode: "heat"
    - alias: "Send SET Off to boiler"
      initial_state: on
      trigger:
        - platform: state
          entity_id: input_boolean.thermostat_heater_switch
          from: 'on'
          to: 'off'
      action:
        - service: climate.set_hvac_mode
          entity_id: climate.secure_rf_zone_2_thermostat_mode_set
          data:
            hvac_mode: "off"

  input_boolean:
    thermostat_heater_switch:
       initial: 'off'

All works. :wink: just need to tidy up the names and labels…

image

1 Like