Add CO Detector (cobj) device support to Tuya (#58292)

This commit is contained in:
Franck Nijhof 2021-10-23 18:15:12 +02:00 committed by GitHub
parent 581d9ec281
commit 0a272669ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 3 deletions

View file

@ -62,6 +62,21 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
),
TAMPER_BINARY_SENSOR,
),
# CO Detector
# https://developer.tuya.com/en/docs/iot/categorycobj?id=Kaiuz3u1j6q1v
"cobj": (
TuyaBinarySensorEntityDescription(
key=DPCode.CO_STATE,
device_class=DEVICE_CLASS_SAFETY,
on_value="1",
),
TuyaBinarySensorEntityDescription(
key=DPCode.CO_STATUS,
device_class=DEVICE_CLASS_SAFETY,
on_value="alarm",
),
TAMPER_BINARY_SENSOR,
),
# Human Presence Sensor
# https://developer.tuya.com/en/docs/iot/categoryhps?id=Kaiuz42yhn1hs
"hps": (