From d677baba366b97bd9742a1b0077cadb1383c91b1 Mon Sep 17 00:00:00 2001 From: Oleksandr Kapshuk Date: Wed, 24 Nov 2021 00:42:21 +0200 Subject: [PATCH] Add hjjcy device category to Tuya integration (#60224) --- homeassistant/components/tuya/sensor.py | 39 +++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/homeassistant/components/tuya/sensor.py b/homeassistant/components/tuya/sensor.py index 4abd77fb7bd..e95ebc2982e 100644 --- a/homeassistant/components/tuya/sensor.py +++ b/homeassistant/components/tuya/sensor.py @@ -138,6 +138,45 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = { ), *BATTERY_SENSORS, ), + # Air Quality Monitor + # No specification on Tuya portal + "hjjcy": ( + SensorEntityDescription( + key=DPCode.TEMP_CURRENT, + name="Temperature", + device_class=DEVICE_CLASS_TEMPERATURE, + state_class=STATE_CLASS_MEASUREMENT, + ), + SensorEntityDescription( + key=DPCode.HUMIDITY_VALUE, + name="Humidity", + device_class=DEVICE_CLASS_HUMIDITY, + state_class=STATE_CLASS_MEASUREMENT, + ), + SensorEntityDescription( + key=DPCode.CO2_VALUE, + name="Carbon Dioxide", + device_class=DEVICE_CLASS_CO2, + state_class=STATE_CLASS_MEASUREMENT, + ), + SensorEntityDescription( + key=DPCode.CH2O_VALUE, + name="Formaldehyde", + state_class=STATE_CLASS_MEASUREMENT, + ), + SensorEntityDescription( + key=DPCode.VOC_VALUE, + name="Volatile Organic Compound", + device_class=DEVICE_CLASS_VOLATILE_ORGANIC_COMPOUNDS, + state_class=STATE_CLASS_MEASUREMENT, + ), + SensorEntityDescription( + key=DPCode.PM25_VALUE, + name="Particulate Matter 2.5 µm", + device_class=DEVICE_CLASS_PM25, + state_class=STATE_CLASS_MEASUREMENT, + ), + ), # Switch # https://developer.tuya.com/en/docs/iot/s?id=K9gf7o5prgf7s "kg": (