Add Tuya Smart Gardening system (#118335)

This commit is contained in:
Jetsada Machom 2024-07-07 15:34:30 +01:00 committed by GitHub
parent 9b4e64ab62
commit 959298d121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 41 additions and 0 deletions

View File

@ -258,6 +258,7 @@ class DPCode(StrEnum):
PRESENCE_STATE = "presence_state"
PRESSURE_STATE = "pressure_state"
PRESSURE_VALUE = "pressure_value"
PUMP = "pump"
PUMP_RESET = "pump_reset" # Water pump reset
OXYGEN = "oxygen" # Oxygen bar
RECORD_MODE = "record_mode"

View File

@ -257,6 +257,15 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = {
entity_category=EntityCategory.CONFIG,
),
),
# Smart Gardening system
# https://developer.tuya.com/en/docs/iot/categorysz?id=Kaiuz4e6h7up0
"sz": (
TuyaLightEntityDescription(
key=DPCode.LIGHT,
brightness=DPCode.BRIGHT_VALUE,
translation_key="light",
),
),
# Dimmer Switch
# https://developer.tuya.com/en/docs/iot/categorytgkg?id=Kaiuz0ktx7m0o
"tgkg": (

View File

@ -941,6 +941,22 @@ SENSORS: dict[str, tuple[TuyaSensorEntityDescription, ...]] = {
state_class=SensorStateClass.MEASUREMENT,
),
),
# Smart Gardening system
# https://developer.tuya.com/en/docs/iot/categorysz?id=Kaiuz4e6h7up0
"sz": (
TuyaSensorEntityDescription(
key=DPCode.TEMP_CURRENT,
translation_key="temperature",
device_class=SensorDeviceClass.TEMPERATURE,
state_class=SensorStateClass.MEASUREMENT,
),
TuyaSensorEntityDescription(
key=DPCode.HUMIDITY_CURRENT,
translation_key="humidity",
device_class=SensorDeviceClass.HUMIDITY,
state_class=SensorStateClass.MEASUREMENT,
),
),
# Curtain
# https://developer.tuya.com/en/docs/iot/s?id=K9gf48qy7wkre
"cl": (

View File

@ -641,6 +641,9 @@
"filter_reset": {
"name": "Filter reset"
},
"pump": {
"name": "Pump"
},
"water_pump_reset": {
"name": "Water pump reset"
},

View File

@ -509,6 +509,18 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
entity_category=EntityCategory.CONFIG,
),
),
# Smart Gardening system
# https://developer.tuya.com/en/docs/iot/categorysz?id=Kaiuz4e6h7up0
"sz": (
SwitchEntityDescription(
key=DPCode.SWITCH,
translation_key="power",
),
SwitchEntityDescription(
key=DPCode.PUMP,
translation_key="pump",
),
),
# Fingerbot
"szjqr": (
SwitchEntityDescription(