Complete Smart Camera (sp) device support to Tuya (#58301)

This commit is contained in:
Franck Nijhof 2021-10-23 21:24:40 +02:00 committed by GitHub
parent e961d92b5e
commit 75e561f1fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 260 additions and 0 deletions

View file

@ -238,6 +238,29 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
# Emergency Button
# https://developer.tuya.com/en/docs/iot/categorysos?id=Kaiuz3oi6agjy
"sos": BATTERY_SENSORS,
# Smart Camera
# https://developer.tuya.com/en/docs/iot/categorysp?id=Kaiuz35leyo12
"sp": (
SensorEntityDescription(
key=DPCode.SENSOR_TEMPERATURE,
name="Temperature",
device_class=DEVICE_CLASS_TEMPERATURE,
state_class=STATE_CLASS_MEASUREMENT,
),
SensorEntityDescription(
key=DPCode.SENSOR_HUMIDITY,
name="Humidity",
device_class=DEVICE_CLASS_HUMIDITY,
state_class=STATE_CLASS_MEASUREMENT,
),
SensorEntityDescription(
key=DPCode.WIRELESS_ELECTRICITY,
name="Battery",
device_class=DEVICE_CLASS_BATTERY,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
state_class=STATE_CLASS_MEASUREMENT,
),
),
# Pressure Sensor
# https://developer.tuya.com/en/docs/iot/categoryylcg?id=Kaiuz3kc2e4gm
"ylcg": (