mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Extend hjjcy device category in Tuya integration (#124854)
* Extend hjjcy device category in Tuya integration * Better AQI level names
This commit is contained in:
parent
5f2964d3e8
commit
bd6b5568eb
@ -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
|
||||
|
@ -236,6 +236,9 @@
|
||||
},
|
||||
"air_quality": {
|
||||
"default": "mdi:air-filter"
|
||||
},
|
||||
"air_quality_index": {
|
||||
"default": "mdi:air-filter"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
|
@ -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
|
||||
|
@ -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": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user