Add Human Presence Sensor (hps) device support to Tuya (#58054)

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

View file

@ -42,6 +42,15 @@ class TuyaBinarySensorEntityDescription(BinarySensorEntityDescription):
# end up being a binary sensor.
# https://developer.tuya.com/en/docs/iot/standarddescription?id=K9i5ql6waswzq
BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
# Human Presence Sensor
# https://developer.tuya.com/en/docs/iot/categoryhps?id=Kaiuz42yhn1hs
"hps": (
TuyaBinarySensorEntityDescription(
key=DPCode.PRESENCE_STATE,
device_class=DEVICE_CLASS_MOTION,
on_value="presence",
),
),
# Door Window Sensor
# https://developer.tuya.com/en/docs/iot/s?id=K9gf48hm02l8m
"mcs": (