#Can't get gemperature of zigbee wired light switch using Zigbee2MQTT but its showing with ZHA

1 messages · Page 1 of 1 (latest)

teal gorge
#

I'm using Aqara D1 light switch (model QBKG21LM). At first I integrated it with HA using ZHA and it worked fine until I tried to bind actions to double click/hold or change operating mode to decoupled, ZHA didn't allow me to switch modes and it didn't show all possible triggers of the switch.
After switching to Zigbee2MQTT all was configured fine and now it works (there is not small delay ~1s to turn on lights after button is pressed but its okay), but temperature sensor is gone. Using some guessing and exploring all buttons in UI I found there is attribute currentTemperature in cluster genDeviceTempCfg of endpoint 1 and after crafting action

action: mqtt.publish
data:
  topic: zigbee2mqtt/bridge/request/device/read
  payload: '{"device": "Astro Room Lights Switch", "endpoint": 1, "cluster": "genDeviceTempCfg", "attributes": ["currentTemperature"]}'

I was able to see in Zigbee2MQTT debug logs output of current temperature of a device, but nowhere else. After some time trying to figure that out - even this one stopped working. I want to keep using Z2M to support all triggers provided my switch but also want to see current temperature, what should I check/do?

TL;DR:
I use Aqara D1 switch via Zigbee2MQTT and want to see device's temperature but it's not exposed anywhere. Device supports outputting its temperature its in endpoint 1 cluster genDeviceTempCfg attribute currentTemperature but I ha veno idea how to transform it into Home Assistant sensor. Using Zigbee2MQTT dev console I'm able to read that property

teal gorge
#

Bump

somber yacht