Add EasyBaby support to Tuya (#85298)

This commit is contained in:
Franck Nijhof 2023-01-06 14:42:09 +01:00 committed by GitHub
parent 8bb5763ea0
commit 9d45071e3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View file

@ -174,6 +174,7 @@ class DPCode(StrEnum):
DECIBEL_SENSITIVITY = "decibel_sensitivity"
DECIBEL_SWITCH = "decibel_switch"
DEHUMIDITY_SET_VALUE = "dehumidify_set_value"
DISINFECTION = "disinfection"
DO_NOT_DISTURB = "do_not_disturb"
DOORCONTACT_STATE = "doorcontact_state" # Status of door window sensor
DOORCONTACT_STATE_2 = "doorcontact_state_2"
@ -354,6 +355,7 @@ class DPCode(StrEnum):
VOLUME_SET = "volume_set"
WARM = "warm" # Heat preservation
WARM_TIME = "warm_time" # Heat preservation time
WATER = "water"
WATER_RESET = "water_reset" # Resetting of water usage days
WATER_SET = "water_set" # Water level
WATERSENSOR_STATE = "watersensor_state"

View file

@ -38,6 +38,20 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
entity_category=EntityCategory.CONFIG,
),
),
# EasyBaby
# Undocumented, might have a wider use
"cn": (
SwitchEntityDescription(
key=DPCode.DISINFECTION,
name="Disinfection",
icon="mdi:bacteria",
),
SwitchEntityDescription(
key=DPCode.WATER,
name="Water",
icon="mdi:water",
),
),
# Smart Pet Feeder
# https://developer.tuya.com/en/docs/iot/categorycwwsq?id=Kaiuz2b6vydld
"cwwsq": (