diff --git a/homeassistant/components/tuya/const.py b/homeassistant/components/tuya/const.py index 55af95f0d34..eb56761d26a 100644 --- a/homeassistant/components/tuya/const.py +++ b/homeassistant/components/tuya/const.py @@ -96,6 +96,7 @@ class DPCode(StrEnum): """ AIR_QUALITY = "air_quality" + AIR_QUALITY_INDEX = "air_quality_index" ALARM_SWITCH = "alarm_switch" # Alarm switch ALARM_TIME = "alarm_time" # Alarm time ALARM_VOLUME = "alarm_volume" # Alarm volume diff --git a/homeassistant/components/tuya/icons.json b/homeassistant/components/tuya/icons.json index 48ae61f36fd..e28371f2b3d 100644 --- a/homeassistant/components/tuya/icons.json +++ b/homeassistant/components/tuya/icons.json @@ -236,6 +236,9 @@ }, "air_quality": { "default": "mdi:air-filter" + }, + "air_quality_index": { + "default": "mdi:air-filter" } }, "switch": { diff --git a/homeassistant/components/tuya/sensor.py b/homeassistant/components/tuya/sensor.py index 1ab3ea700d7..4f3c6099377 100644 --- a/homeassistant/components/tuya/sensor.py +++ b/homeassistant/components/tuya/sensor.py @@ -264,8 +264,12 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { ), ), # Air Quality Monitor - # No specification on Tuya portal + # https://developer.tuya.com/en/docs/iot/hjjcy?id=Kbeoad8y1nnlv "hjjcy": ( + TuyaSensorEntityDescription( + key=DPCode.AIR_QUALITY_INDEX, + translation_key="air_quality_index", + ), TuyaSensorEntityDescription( key=DPCode.TEMP_CURRENT, translation_key="temperature", @@ -301,6 +305,13 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = { device_class=SensorDeviceClass.PM25, state_class=SensorStateClass.MEASUREMENT, ), + TuyaSensorEntityDescription( + key=DPCode.PM10, + translation_key="pm10", + device_class=SensorDeviceClass.PM10, + state_class=SensorStateClass.MEASUREMENT, + ), + *BATTERY_SENSORS, ), # Formaldehyde Detector # Note: Not documented diff --git a/homeassistant/components/tuya/strings.json b/homeassistant/components/tuya/strings.json index 6b699c0ffc0..865fbaffbbe 100644 --- a/homeassistant/components/tuya/strings.json +++ b/homeassistant/components/tuya/strings.json @@ -620,6 +620,17 @@ "good": "Good", "severe": "Severe" } + }, + "air_quality_index": { + "name": "Air quality index", + "state": { + "level_1": "Level 1", + "level_2": "Level 2", + "level_3": "Level 3", + "level_4": "Level 4", + "level_5": "Level 5", + "level_6": "Level 6" + } } }, "switch": {