SONOFF TRVZB: `temperature_sensor_select` publishes `external_3`, which is not in the discovery options since 2.14.2-1 (HA MQTT select errors)
What happened?
After updating the Zigbee2MQTT Home Assistant add-on from 2.14.1-1 to 2.14.2-1, Home Assistant logs this error repeatedly for each of my SONOFF TRVZB valves (195 occurrences in about an hour):
Logger: homeassistant.components.mqtt.select
Source: components/mqtt/select.py:129
Invalid option for select.0xc4d8c8fffe4a6d8b_temperature_sensor_select: 'external_3' (valid options: ['local_temperature', 'remote_temperature', 'remote_source_offline'])
The same error appears for 4 TRVZB devices. In 2.14.2-1 the discovery options for temperature_sensor_select are local_temperature, remote_temperature and remote_source_offline, but the device state still publishes "temperature_sensor_select": "external_3", which HA rejects.
The valves use an external temperature sensor (external_temperature_input is being set), and they report the value 0x03. Rolling back to 2.14.1-1 stops the errors.
What did you expect to happen?
The published state of temperature_sensor_select should match the options announced in the HA discovery (for example remote_temperature for value 0x03), so no invalid-option errors are logged.
How to reproduce it (minimal and precise)
- Have a SONOFF TRVZB using an external temperature sensor (reported value 3).
- Update Zigbee2MQTT from 2.14.1-1 to 2.14.2-1 with the Home Assistant MQTT integration enabled.
- Check the Home Assistant logs for the errors above.
Device
- Model: SONOFF TRVZB, firmware 1.4.4 (build 20251229, version 5124)
- 4 affected devices
MQTT state of one affected device (2.14.1-1, trimmed)
{
"external_temperature_input": 21.7,
"local_temperature": 21.7,
"system_mode": "off",
"temperature_sensor_select": "external_3",
"smart_temperature_control": null,
"temperature_accuracy": -1
}
Zigbee2MQTT version
2.14.2-1 (add-on), previously 2.14.1-1 (no errors)
Adapter firmware version
EmberZNet 0x04e3e5fffe799308 Revision: 7.4.4 [GA]
Adapter
SONOFF Zigbee 3.0 USB Dongle Plus | ZBDongle-E
Setup
Add-on on Home Assistant OS on VMware Workstation on Windows 11
Device database.db entry
No response
Debug log
No response
Notes
No response
Are you sure you are not updating this via an automation?
Invalid option for select.0xc4d8c8fffe4a6d8b_temperature_sensor_select: 'external_3'
The old values are gone, see https://github.com/Koenkk/zigbee2mqtt/discussions/33243#discussioncomment-18708933
In HA I see exposed the same values as in Z2M:
I have updated my automations from the old to the new values and they work.
Same here with 9 TRVZB valves (firmware 1.4.4, 5124) after updating the add-on from 2.14.1-1 to 2.14.2-1, except the rejected value is 'internal':
Invalid option for select.office_trv_temperature_sensor_select: 'internal' (valid options: ['local_temperature', 'remote_temperature', 'remote_source_offline'])
Cause: the device isn't sending the old value. It's Z2M's state cache.
- 2.14.2 bundles zigbee-herdsman-converters 26.115.1, up from 26.105.0. That version changes the TRVZB
temperature_sensor_selectlookup from{internal: 0, external: 1, external_2: 2, external_3: 3}to{local_temperature: 0, remote_temperature: 1 or 3, remote_source_offline: 2}. - The valve doesn't report
temperatureSensorSelect(0x600e) on its own. Mine sent none in the three hours after the update. So the old label stays in the cache (state.json) and goes out with every TRV publish, and HA rejects it against the new discoveryoptions.
Workaround: read the attribute once per valve. The read response goes through the new converter and replaces the cached label:
- topic:
zigbee2mqtt/<FRIENDLY_NAME>/get - payload:
{"temperature_sensor_select": ""}
The refresh button on the device's Exposes tab does the same. All 9 of mine answered within seconds with local_temperature, the HA errors stopped straight away, and the new value was in state.json after the next save. In your case, external_3 is raw value 3, so it should come back as remote_temperature. Nothing is written to the device, and rolling back isn't needed.
Possible fix in the converter: map the old cached labels to the new ones (internal → local_temperature, external/external_2/external_3 → remote_temperature). Or read the attribute once at startup or configure for TRVZB, so existing installs don't keep publishing a label the discovery no longer advertises.
Are you sure you are not updating this via an automation?
Invalid option for select.0xc4d8c8fffe4a6d8b_temperature_sensor_select: 'external_3'
The old values are gone, see https://github.com/Koenkk/zigbee2mqtt/discussions/33243#discussioncomment-18708933
In HA I see exposed the same values as in Z2M:
![]()
I have updated my automations from the old to the new values and they work.
Same here with 4 TRVZB (fw 1.4.4). Confirming the stale cached label as the cause. Reading the attribute once per valve clear it, and a migration of old cached labels in the converter would help existing installs.
CC @cubez2mdeveloper
What I don't understand is why mine just worked and others are experiencing this issue.
Hi @Petarkir2000 @bnlqn ,
Thanks for the detailed investigation and for sharing the workaround.
We agree that reading the temperature_sensor_select attribute is a good workaround for existing installations.
We will add a version to the device definition. Once the definition version changes, Zigbee2MQTT will run the configure function again, where we will re-read the temperature_sensor_select attribute. This will refresh the cached value and ensure that the correct, newly mapped value is published.
Sorry for the inconvenience, and thank you again for helping identify the cause and providing a practical workaround.