Generic Thermostat & Hama 00176593 & Zigbee2Mqtt do not work - need help!

I have several Thermostatic radiator Hama 00176593 Thermostat in use and integrated them with Zigbee2Mqtt.

119625154-2edb3380-be0a-11eb-89f6-4ac5707b46b8

Status display works, but MQTT messages are only published if I change settings in the dashboard or set the temperature with script

init_climate_thermostat:
  alias: Heizungsthermostate einstellen
  sequence:
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-bad/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_bad') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-office/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_office') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-wc/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_wc') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-wohnzimmer1/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_wohnzimmer1') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-wohnzimmer2/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_wohnzimmer2') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-kitchen/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_kitchen') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-kindenzimmer1/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_kindenzimmer1') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-kinderzimmer2/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_kindenzimmer2') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-schlafzimmer/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_schlafzimmer') | float }}"
    - service: mqtt.publish
      data_template:
        topic: conbee2mqtt/thermostat-fitnessraum/set/current_heating_setpoint
        payload_template: "{{ states('input_number.thermostat_fitnessraum') | float }}"

The control takes place via Lovelace thermostat. Inital, when I restart home assistant, then the temperature is set for all thermostats via the script.

- platform: "mqtt"
  name: Thermostat Bad
  temperature_unit: "C"
  initial: 25.00
  temp_step: 0.5
  min_temp: "5"
  max_temp: "30"
  json_attributes_topic: conbee2mqtt/thermostat-bad
  temperature_command_topic: "conbee2mqtt/thermostat-bad/set/current_heating_setpoint"
  availability_topic: "conbee2mqtt/bridge/state"
  current_temperature_topic: "conbee2mqtt/thermostat-bad"
  current_temperature_template: "{{ value_json.local_temperature }}"
  temperature_state_topic: "conbee2mqtt/thermostat-bad"
  temperature_state_template: "{{ value_json.current_heating_setpoint }}"
  mode_state_topic: "conbee2mqtt/thermostat-bad"
  mode_state_template: "{{ value_json.system_mode }}"
  mode_command_topic: "conbee2mqtt/thermostat-bad/set/system_mode"
  modes:
    - "off"
    - "heat"
    - "auto"
  action_topic: "conbee2mqtt/thermostat-bad/set/system_mode"
  action_template: "{% set values = {'idle':'off','heat':'heating','auto':'auto'} %}{{ values[value_json.running_state] }}"
  away_mode_command_topic: "conbee2mqtt/thermostat-bad/set/value_json.away_mode"
  away_mode_state_topic: "conbee2mqtt/thermostat-bad"
  away_mode_state_template: "{{ value_json.away_mode }}"
  payload_on: "true"
  payload_off: "false"
  retain: true

After a certainTime, however, this is always reset to 16 degrees.

Zigbee2Mqtt:

Zigbee2MQTT Version
1.21.2-dev commit: 839e2801
Coordinator Typ:  ConBee2/RaspBee2
Coordinator Version:  0x26660700
Frontend Version: 0.6.12

Homassistant:

System Health

version core-2021.10.5
installation_type Home Assistant Core
dev false
hassio false
docker false
user homeassistant
virtualenv true
python_version 3.8.10
os_name Linux
os_version 5.8.0-63-generic
arch x86_64
timezone Europe/Vaduz
GitHub API ok
Github API Calls Remaining 4681
Installed Version 1.15.2
Stage running
Available Repositories 961
Installed Repositories 56

Does anyone know any solution to this problem?
Is it due to the Zigbee2MQTT or the Homeassistant configuration?

Is there a reason why you are using MQTT rather than the climate entity?

Because with Zigbee2MQTT i can only use MQTT. I haven’t found any other solution to integrate the Hama 00176593 thermostat.

Why don’t you use the auto-discovery Zigbee2mqtt provides ? Works great with my TRV.

Thanks for the tip, but I have over 50 Zigbee devices in use and if I switch on auto-discovery Zigbee2mqtt, then all of them will be delivered and I would have to convert a large number of automations. …

A QAD method would be if I simply set the target temperature every 10 minutes via an automation.

# ## #############################################
# ## AUTOMATION: Update hama thermostat
# ## #############################################
- id: update_hama
  alias: 'Zigbee Thermostat Updates'
  initial_state: true 
  # set the current current_heating_setpoint to the default values
  trigger:
    - platform: time_pattern
      minutes: "/10"
  action:
    # all thermostat to default current_heating_setpoint
    - service: script.init_climate_thermostat

Nevertheless, the question arises for me, who always sets the target temperature to 16 ° C after a certain time?

Could it be because of the presets ?

Why not use Home Assistant. It has climate support.

I have now set the mode to “heat” and now everything works fine. The target temperature is only set to 16 ° C after a certain time if the mode is set to “auto”.

There is no difference if I have the sensors over

climate:   
   - platform: "mqtt"
       ........

or via auto-discovery Zigbee2mqtt

After a long search I found the information in the Hama manual. it looks like this If the “AUTO” mode is selected, the thermostat is set to the “Outward” mode!

modes:
    - "off"
    - "heat"
    - "auto"

** Modes auto = Outward mode !!!

If this mode is active, the set temperature is automatically dialled down to 16°**