Namron 4512758 thermostat: window_open discovered as MQTT switch with invalid device_class
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.7k
- Forks
- 2k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 35
Description
What happened?
Two Namron Zigbee Thermostat 16A devices (model 4512758, firmware 1.08) fail configuration in Zigbee2MQTT.
During configure, Zigbee2MQTT tries to read:
- windowOpenCheck
- antiFrost
- windowState
- sensorMode
Both devices return:
Status 'UNSUPPORTED_ATTRIBUTE'
In addition, Zigbee2MQTT publishes an MQTT discovery message for:
switch_window_open
with:
"device_class": "window"
Home Assistant rejects this discovery message with:
expected SwitchDeviceClass or one of 'outlet', 'switch'
Both thermostats show identical behavior.
The issue is reproducible on a completely new Home Assistant installation and a new Zigbee2MQTT installation.
What did you expect to happen?
The window_open entity should be discovered without errors.
Either:
- expose window_open as a binary sensor,
- expose it without a device_class,
- or use a valid switch device_class.
Home Assistant should not reject the MQTT discovery message.
How to reproduce it (minimal and precise)
- Pair a Namron Zigbee Thermostat 16A (model 4512758, firmware 1.08) with Zigbee2MQTT 2.13.0.
- Allow Zigbee2MQTT to configure the device.
- Observe the Zigbee2MQTT log:
Failed to configure ...
Status 'UNSUPPORTED_ATTRIBUTE'
for:
- windowOpenCheck
- antiFrost
- windowState
- sensorMode
- Check Home Assistant MQTT discovery logs.
- Observe that Zigbee2MQTT publishes:
homeassistant/switch//switch_window_open/config
with:
"device_class": "window"
- Home Assistant rejects the discovery message with:
expected SwitchDeviceClass or one of 'outlet', 'switch'
Zigbee2MQTT version
2.13.0
Adapter firmware version
20210708
Adapter
Coordinator: SONOFF Zigbee 3.0 USB Dongle Plus (ZBDongle-P)
Setup
Home Assistant OS
Machine:
- Intel NUC
- Intel Celeron N3160 (4 cores)
- 7850 MB RAM
OS:
- Home Assistant OS
- Linux 6.18.39-haos (x64)
Zigbee2MQTT:
- Installed as Home Assistant Add-on
Coordinator:
- Electrolama zig-a-zig-ah! (zzh!)
- CC2652RB
MQTT:
- Mosquitto Broker add-on
The issue is reproducible on a completely fresh Home Assistant installation and a fresh Zigbee2MQTT installation.
Device database.db entry
No response
Debug log
z2m: Failed to configure '0x286847fffe1c6726', attempt 3
Error: ZCL command 0x286847fffe1c6726/1 hvacThermostat.read(
["windowOpenCheck","antiFrost","windowState","sensorMode"]
) failed (Status 'UNSUPPORTED_ATTRIBUTE')
Error 'expected SwitchDeviceClass or one of 'outlet', 'switch'
for dictionary value @ data['device_class']'
when processing MQTT discovery message topic:
homeassistant/switch/0x6c5cb1fffe20acd2/switch_window_open/config
with:
"device_class": "window"
Both thermostats are Namron Zigbee Thermostat 16A
(Model 4512758, firmware 1.08).
Both devices show identical behavior.
Notes
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Namron 4512758 device definition and the code that builds its MQTT discovery payload. Reproduce with firmware 1.08 and Zigbee2MQTT 2.13.0, then inspect handling of the unsupported attributes and the window_open entity. Done means configuration no longer produces avoidable errors and Home Assistant accepts the published discovery message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100