mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Complementing the Tuya Fan (fs) category (#64947)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
4e808133f2
commit
982580b95a
@ -90,6 +90,7 @@ class TuyaDeviceClass(StrEnum):
|
||||
BASIC_ANTI_FLICKR = "tuya__basic_anti_flickr"
|
||||
BASIC_NIGHTVISION = "tuya__basic_nightvision"
|
||||
DECIBEL_SENSITIVITY = "tuya__decibel_sensitivity"
|
||||
FAN_ANGLE = "tuya__fan_angle"
|
||||
FINGERBOT_MODE = "tuya__fingerbot_mode"
|
||||
IPC_WORK_MODE = "tuya__ipc_work_mode"
|
||||
LED_TYPE = "tuya__led_type"
|
||||
@ -186,6 +187,8 @@ class DPCode(StrEnum):
|
||||
CONTROL = "control"
|
||||
CONTROL_2 = "control_2"
|
||||
CONTROL_3 = "control_3"
|
||||
COUNTDOWN = "countdown" # Countdown
|
||||
COUNTDOWN_SET = "countdown_set" # Countdown setting
|
||||
CRY_DETECTION_SWITCH = "cry_detection_switch"
|
||||
CUP_NUMBER = "cup_number" # NUmber of cups
|
||||
CUR_CURRENT = "cur_current" # Actual current
|
||||
@ -201,11 +204,15 @@ class DPCode(StrEnum):
|
||||
DUSTER_CLOTH = "duster_cloth"
|
||||
EDGE_BRUSH = "edge_brush"
|
||||
ELECTRICITY_LEFT = "electricity_left"
|
||||
FAN_BEEP = "fan_beep" # Sound
|
||||
FAN_COOL = "fan_cool" # Cool wind
|
||||
FAN_DIRECTION = "fan_direction" # Fan direction
|
||||
FAN_HORIZONTAL = "fan_horizontal" # Horizontal swing flap angle
|
||||
FAN_SPEED = "fan_speed"
|
||||
FAN_SPEED_ENUM = "fan_speed_enum" # Speed mode
|
||||
FAN_SPEED_PERCENT = "fan_speed_percent" # Stepless speed
|
||||
FAN_MODE = "fan_mode"
|
||||
FAN_VERTICAL = "fan_vertical" # Vertical swing flap angle
|
||||
FAR_DETECTION = "far_detection"
|
||||
FAULT = "fault"
|
||||
FEED_REPORT = "feed_report"
|
||||
@ -218,6 +225,7 @@ class DPCode(StrEnum):
|
||||
GAS_SENSOR_STATE = "gas_sensor_state"
|
||||
GAS_SENSOR_STATUS = "gas_sensor_status"
|
||||
GAS_SENSOR_VALUE = "gas_sensor_value"
|
||||
HUMIDIFIER = "humidifier" # Humidification
|
||||
HUMIDITY_CURRENT = "humidity_current" # Current humidity
|
||||
HUMIDITY_SET = "humidity_set" # Humidity setting
|
||||
HUMIDITY_VALUE = "humidity_value" # Humidity
|
||||
@ -264,6 +272,7 @@ class DPCode(StrEnum):
|
||||
PRESSURE_STATE = "pressure_state"
|
||||
PRESSURE_VALUE = "pressure_value"
|
||||
PUMP_RESET = "pump_reset" # Water pump reset
|
||||
OXYGEN = "oxygen" # Oxygen bar
|
||||
RECORD_MODE = "record_mode"
|
||||
RECORD_SWITCH = "record_switch" # Recording switch
|
||||
RELAY_STATUS = "relay_status"
|
||||
@ -320,6 +329,7 @@ class DPCode(StrEnum):
|
||||
SWITCH_USB6 = "switch_usb6" # USB 6
|
||||
SWITCH_VERTICAL = "switch_vertical" # Vertical swing flap switch
|
||||
SWITCH_VOICE = "switch_voice" # Voice switch
|
||||
TEMP = "temp" # Temperature setting
|
||||
TEMP_BOILING_C = "temp_boiling_c"
|
||||
TEMP_BOILING_F = "temp_boiling_f"
|
||||
TEMP_CONTROLLER = "temp_controller"
|
||||
|
@ -275,6 +275,16 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = {
|
||||
color_temp=DPCode.TEMP_CONTROLLER,
|
||||
),
|
||||
),
|
||||
# Fan
|
||||
# https://developer.tuya.com/en/docs/iot/categoryfs?id=Kaiuz1xweel1c
|
||||
"fs": (
|
||||
TuyaLightEntityDescription(
|
||||
key=DPCode.LIGHT,
|
||||
color_mode=DPCode.WORK_MODE,
|
||||
brightness=DPCode.BRIGHT_VALUE,
|
||||
color_temp=DPCode.TEMP_VALUE,
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
# Socket (duplicate of `kg`)
|
||||
|
@ -241,6 +241,15 @@ NUMBERS: dict[str, tuple[NumberEntityDescription, ...]] = {
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
# Fan
|
||||
# https://developer.tuya.com/en/docs/iot/categoryfs?id=Kaiuz1xweel1c
|
||||
"fs": (
|
||||
NumberEntityDescription(
|
||||
key=DPCode.TEMP,
|
||||
name="Temperature",
|
||||
icon="mdi:thermometer-lines",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
@ -227,9 +227,38 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
||||
icon="mdi:layers-outline",
|
||||
),
|
||||
),
|
||||
# Fan
|
||||
# https://developer.tuya.com/en/docs/iot/f?id=K9gf45vs7vkge
|
||||
"fs": (
|
||||
SelectEntityDescription(
|
||||
key=DPCode.FAN_VERTICAL,
|
||||
name="Vertical Swing Flap Angle",
|
||||
device_class=TuyaDeviceClass.FAN_ANGLE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:format-vertical-align-center",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.FAN_HORIZONTAL,
|
||||
name="Horizontal Swing Flap Angle",
|
||||
device_class=TuyaDeviceClass.FAN_ANGLE,
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:format-horizontal-align-center",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN,
|
||||
name="Countdown",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.COUNTDOWN_SET,
|
||||
name="Countdown Setting",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
icon="mdi:timer-cog-outline",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
# Socket (duplicate of `kg`)
|
||||
# https://developer.tuya.com/en/docs/iot/s?id=K9gf7o5prgf7s
|
||||
SELECTS["cz"] = SELECTS["kg"]
|
||||
|
@ -80,6 +80,11 @@
|
||||
"point": "Point",
|
||||
"part": "Part",
|
||||
"pick_zone": "Pick Zone"
|
||||
},
|
||||
"tuya__fan_angle": {
|
||||
"30": "30°",
|
||||
"60": "60°",
|
||||
"90": "90°"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -480,6 +480,40 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
||||
name="Switch",
|
||||
),
|
||||
),
|
||||
# Fan
|
||||
# https://developer.tuya.com/en/docs/iot/categoryfs?id=Kaiuz1xweel1c
|
||||
"fs": (
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.ANION,
|
||||
name="Anion",
|
||||
icon="mdi:atom",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.HUMIDIFIER,
|
||||
name="Humidification",
|
||||
icon="mdi:air-humidifier",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.OXYGEN,
|
||||
name="Oxygen Bar",
|
||||
icon="mdi:molecule",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.FAN_BEEP,
|
||||
name="Sound",
|
||||
icon="mdi:minus-circle",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CHILD_LOCK,
|
||||
name="Child Lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
# Socket (duplicate of `pc`)
|
||||
|
Loading…
x
Reference in New Issue
Block a user