Kane610/deconz

support for extra states in ZHApresence

Closed this issue · 4 comments

can we add support for extra states in ZHApresence like 'tampered' and lowbattery'. These states are supported and reported by deconz api but not exposed as binary_sensors in HA. Only 'presence' is exposed in HA.
e.g. deconz api state report:
"state":{"lastupdated":"2020-10-11T14:43:57.887","lowbattery":false,"presence":false,"tampered":true},"swversion":"20140929","type":"ZHAPresence","uniqueid":"xxx"}

a. 'lowbattery' should be exposed as binary_sensor with device class battery
b. 'tampered' i think should be exposed as Binary_sensor with device class problem or safety. Or even better a new device class tamper?

Are these really exclusive to zhapresence device types?

'tampered' and ' low battery' state attribute is supported under (bool type):
ZHAAlarm, ZHACarbonMonoxide, ZHAFire, ZHAOpenClose, ZHAPresence and ZHAWater

Please try out the hass beta to verify that tampering entity works as expected @mamrai1

Low battery sensor will be out with 2022.2 release of Home Assistant.