zha-device-handlers
zha-device-handlers copied to clipboard
Improve support for Tuya smoke sensor `_TZE284_rccxox8p`
This commit extends existing support for Tuya TS0601 _TZE284_rccxox8p by covering:
- Smoke detection sensor
- Smoke concentration sensor
- Mute configuration
- Battery level diagnostic
- Sensor failure diagnostic
- Self-test diagnostic
Previously, the only sensor available was:
- Smoke detection sensor
Proposed change
Before:
After:
Additional information
Device looks like this:
Information about Tuya DPs exposed by this device has been found in https://github.com/Koenkk/zigbee-herdsman-converters/blob/a19bc8c4652496998f32ac777963379f9c7c24cf/src/devices/tuya.ts#L6553
I own the device. Have tested it with my Nabu Casea Home Assistant Yellow with ZHA, core 2025.4.3, by prototyping custom quirk first and then changing the original quirk file directly in the homeassistant container in:
/usr/local/lib/python3.13/site-packages/zhaquirks/tuya/tuya_smoke.py
Tested functionalities:
- Smoke detection - pass
- Mute swicth when alarm is triggered - pass
- Self-test button - pass
Not tested:
- Sensor failure - obviously, would like to avoid having my device damaged :D
- Battery level - didn't find any older batteries at home, have only 100% new ones, so the battery was always 100% when playing with the device
Here are the values when smoke is detected:
Mute works both ways. One can change it from configuration panel or directly by pressing the button on the device.
It may be worth mentioning that self-test won't change the smoke detection sensor but, instead, a different sensor designed just for test purposes. Integrators in HA should keep this in mind. I was a bit surprised but it is what it is.
Self-test sensor:
Smoke detection event in history:
Checklist
- [x] The changes are tested and work correctly
- [ ]
pre-commitchecks pass / the code has been formatted using Black - [ ] Tests have been added to verify that the new code works