MQTT Invalid Modes

I am running zigbee2MQTT and noticed the following in my HA logs

is showing up thousands of times. Looking at the developer tag for my Drayton Wiser TRVs which I added recently I see

which appear to all be valid modes.

All the climate devices via MQTT appear to have the same list of modes so I don’t appear to be having the capitalisation issue.

What can I do about this warning?

What version of HA?
What version of zigbee2mqtt?

HA is 2021.11.2
Zigbee2mqtt is 1.22.0

Hm, same version as mine, same ‘modes’


Although I have my log set to error

Maybe try to set your state to one of the modes

That error means a “mode” state received from MQTT is not in the list you configured.
The error displays the mode it received, which seems blank/empty/null here.

That doesn’t seem to work and it just goes back to unknown.

These are the full details of what I suspect are the issue (I added four Drayton Wiser TRVs the other day) as shown in HA and Zigbee2MQTT

I am also seeing exactly the same number of warnings for

Template variable warning: 'dict object' has no attribute 'system_mode' when rendering '{{ value_json.system_mode }}'

08:32:48 – (WARNING) helpers/ - message first occurred at 9 November 2021, 17:01:07 and shows up 11816 times

Which I guess means there is no system_mode value being sent. Is this an issue with the TRV, Zigbee2MQTT or configuration?

There are obviously thousands of these errors (now ~12k) which is starting to fill up logs and ignoring them will lead to space running out at some point. Is there anyway I can workout what is going on ?

Mmm… Let’s step back a bit.
The Drayton Wiser is just a thermostatic valve, right? So not a climate control/HVAC device.

What created “climate.bedroom_trv”?

If I compare with my Zigbee thermostatic valve, Zigbee2mqtt did.

Well, I guess Z2M won’t send a “mode” for a valve, nor will it define “hvac_modes”, will it?

I have hvac_modes as attributes, but this is the discovery message:

  "availability": [
      "topic": "zigbee2mqtt/bridge/state"
  "away_mode_command_topic": "zigbee2mqtt/slaapkamer_trv/set/away_mode",
  "away_mode_state_template": "{{ value_json.away_mode }}",
  "away_mode_state_topic": "zigbee2mqtt/slaapkamer_trv",
  "current_temperature_template": "{{ value_json.local_temperature }}",
  "current_temperature_topic": "zigbee2mqtt/slaapkamer_trv",
  "device": {
    "identifiers": [
    "manufacturer": "TuYa",
    "model": "Radiator valve with thermostat (TS0601_thermostat)",
    "name": "slaapkamer_trv",
    "sw_version": "Zigbee2MQTT 1.22.0"
  "hold_command_topic": "zigbee2mqtt/slaapkamer_trv/set/preset",
  "hold_modes": [
  "hold_state_template": "{{ value_json.preset }}",
  "hold_state_topic": "zigbee2mqtt/slaapkamer_trv",
  "json_attributes_topic": "zigbee2mqtt/slaapkamer_trv",
  "max_temp": "35",
  "min_temp": "5",
  "mode_command_topic": "zigbee2mqtt/slaapkamer_trv/set/system_mode",
  "mode_state_template": "{{ value_json.system_mode }}",
  "mode_state_topic": "zigbee2mqtt/slaapkamer_trv",
  "modes": [
  "name": "slaapkamer_trv",
  "temp_step": 0.5,
  "temperature_command_topic": "zigbee2mqtt/slaapkamer_trv/set/current_heating_setpoint",
  "temperature_state_template": "{{ value_json.current_heating_setpoint }}",
  "temperature_state_topic": "zigbee2mqtt/slaapkamer_trv",
  "temperature_unit": "C",
  "unique_id": "0x60a423fffea0e117_climate_zigbee2mqtt"
1 Like

And you also have “technical” attributes like “ADC”/“MOT”/… ?

I fixed the systemMode issue of my TRVs in this way:

Select the device, go to Dev Console, select Endpoint (should be 1), Cluster: havcThermostat, Attribute: systemMode.
Push Read button.
The answer should be the info like in my picture.
Now in HA, my TRV has the attribute systemMode.


I have the same problem but your solution gives me an error.

Error 2022-06-14 17:49:48 `Publish 'set' 'read' to 'Bathroom Floor' failed: 'Error: Read 0x5c0272fffed75191/1 hvacThermostat(["systemMode"], {"sendWhen":"immediate","timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":true,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed (Status 'UNSUPPORTED_ATTRIBUTE')'`

It’s almost 1k occurrences in 20 minutes.
My thermostate is Moes BTH-002 Zigbee.

Any idea how to resolve that issue?