Extend Tuya Humidifier (#58260)

pull/58351/head
alexanv1 2021-10-24 11:34:05 -07:00 committed by GitHub
parent 8c3b711c5e
commit f4c2c54e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View File

@ -172,6 +172,7 @@ class DPCode(str, Enum):
CO2_STATE = "co2_state"
CO2_VALUE = "co2_value" # CO2 concentration
COLOR_DATA_V2 = "color_data_v2"
COLOUR_DATA_HSV = "colour_data_hsv" # Colored light mode
COLOUR_DATA = "colour_data" # Colored light mode
COLOUR_DATA_V2 = "colour_data_v2" # Colored light mode
CONCENTRATION_SET = "concentration_set" # Concentration setting

View File

@ -45,6 +45,7 @@ HUMIDIFIERS: dict[str, TuyaHumidifierEntityDescription] = {
# https://developer.tuya.com/en/docs/iot/categoryjsq?id=Kaiuz1smr440b
"jsq": TuyaHumidifierEntityDescription(
key=DPCode.SWITCH,
dpcode=(DPCode.SWITCH, DPCode.SWITCH_SPRAY),
humidity=DPCode.HUMIDITY_SET,
device_class=DEVICE_CLASS_HUMIDIFIER,
),

View File

@ -109,6 +109,16 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = {
color_data=DPCode.COLOUR_DATA,
),
),
# Humidifier Light
# https://developer.tuya.com/en/docs/iot/categoryjsq?id=Kaiuz1smr440b
"jsq": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
color_mode=DPCode.WORK_MODE,
brightness=DPCode.BRIGHT_VALUE,
color_data=DPCode.COLOUR_DATA_HSV,
),
),
# Switch
# https://developer.tuya.com/en/docs/iot/s?id=K9gf7o5prgf7s
"kg": (