Complete Solar Light (tyndj) device support to Tuya (#58302)

pull/58328/head
Franck Nijhof 2021-10-24 11:46:46 +02:00 committed by GitHub
parent 438ca73aba
commit 6f0c1d2345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 0 deletions

View File

@ -269,6 +269,7 @@ class DPCode(str, Enum):
SWITCH_LED_2 = "switch_led_2"
SWITCH_LED_3 = "switch_led_3"
SWITCH_NIGHT_LIGHT = "switch_night_light"
SWITCH_SAVE_ENERGY = "switch_save_energy"
SWITCH_SPRAY = "switch_spray" # Spraying switch
SWITCH_USB1 = "switch_usb1" # USB 1
SWITCH_USB2 = "switch_usb2" # USB 2

View File

@ -261,6 +261,9 @@ SENSORS: dict[str, tuple[SensorEntityDescription, ...]] = {
state_class=STATE_CLASS_MEASUREMENT,
),
),
# Solar Light
# https://developer.tuya.com/en/docs/iot/tynd?id=Kaof8j02e1t98
"tyndj": BATTERY_SENSORS,
# Pressure Sensor
# https://developer.tuya.com/en/docs/iot/categoryylcg?id=Kaiuz3kc2e4gm
"ylcg": (

View File

@ -353,6 +353,16 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
entity_category=ENTITY_CATEGORY_CONFIG,
),
),
# Solar Light
# https://developer.tuya.com/en/docs/iot/tynd?id=Kaof8j02e1t98
"tyndj": (
SwitchEntityDescription(
key=DPCode.SWITCH_SAVE_ENERGY,
name="Energy Saving",
icon="mdi:leaf",
entity_category=ENTITY_CATEGORY_CONFIG,
),
),
# Ceiling Light
# https://developer.tuya.com/en/docs/iot/ceiling-light?id=Kaiuz03xxfc4r
"xdd": (