Add TRV (`wkf`) support to Tuya (#65649)

pull/65657/head
Franck Nijhof 2022-02-04 12:34:15 +01:00 committed by GitHub
parent 320df10a26
commit b7007b364a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 37 additions and 0 deletions

View File

@ -194,6 +194,16 @@ BINARY_SENSORS: dict[str, tuple[TuyaBinarySensorEntityDescription, ...]] = {
),
TAMPER_BINARY_SENSOR,
),
# Thermostatic Radiator Valve
# Not documented
"wkf": (
TuyaBinarySensorEntityDescription(
key=DPCode.WINDOW_STATE,
name="Window",
device_class=BinarySensorDeviceClass.WINDOW,
on_value="opened",
),
),
# Temperature and Humidity Sensor
# https://developer.tuya.com/en/docs/iot/categorywsdcg?id=Kaiuz3hinij34
"wsdcg": (TAMPER_BINARY_SENSOR,),

View File

@ -79,6 +79,12 @@ CLIMATE_DESCRIPTIONS: dict[str, TuyaClimateEntityDescription] = {
key="wk",
switch_only_hvac_mode=HVAC_MODE_HEAT_COOL,
),
# Thermostatic Radiator Valve
# Not documented
"wkf": TuyaClimateEntityDescription(
key="wkf",
switch_only_hvac_mode=HVAC_MODE_HEAT,
),
}

View File

@ -367,6 +367,8 @@ class DPCode(StrEnum):
WATER_SET = "water_set" # Water level
WATERSENSOR_STATE = "watersensor_state"
WET = "wet" # Humidification
WINDOW_CHECK = "window_check"
WINDOW_STATE = "window_state"
WINDSPEED = "windspeed"
WIRELESS_BATTERYLOCK = "wireless_batterylock"
WIRELESS_ELECTRICITY = "wireless_electricity"

View File

@ -447,6 +447,9 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
),
*BATTERY_SENSORS,
),
# Thermostatic Radiator Valve
# Not documented
"wkf": BATTERY_SENSORS,
# Temperature and Humidity Sensor
# https://developer.tuya.com/en/docs/iot/categorywsdcg?id=Kaiuz3hinij34
"wsdcg": (

View File

@ -443,6 +443,22 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
entity_category=EntityCategory.CONFIG,
),
),
# Thermostatic Radiator Valve
# Not documented
"wkf": (
SwitchEntityDescription(
key=DPCode.CHILD_LOCK,
name="Child Lock",
icon="mdi:account-lock",
entity_category=EntityCategory.CONFIG,
),
SwitchEntityDescription(
key=DPCode.WINDOW_CHECK,
name="Open Window Detection",
icon="mdi:window-open",
entity_category=EntityCategory.CONFIG,
),
),
# Ceiling Light
# https://developer.tuya.com/en/docs/iot/ceiling-light?id=Kaiuz03xxfc4r
"xdd": (