Extend Tuya Dimmer (tgq) support (#58951)

This commit is contained in:
Franck Nijhof 2021-11-02 19:10:42 +01:00 committed by GitHub
parent 4a2fb0e7ab
commit d1bb580dc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 0 deletions

View file

@ -177,6 +177,13 @@ LIGHTS: dict[str, tuple[TuyaLightEntityDescription, ...]] = {
# Dimmer
# https://developer.tuya.com/en/docs/iot/tgq?id=Kaof8ke9il4k4
"tgq": (
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED,
name="Light",
brightness=(DPCode.BRIGHT_VALUE_V2, DPCode.BRIGHT_VALUE),
brightness_max=DPCode.BRIGHTNESS_MAX_1,
brightness_min=DPCode.BRIGHTNESS_MIN_1,
),
TuyaLightEntityDescription(
key=DPCode.SWITCH_LED_1,
name="Light",

View file

@ -177,6 +177,22 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
entity_category=ENTITY_CATEGORY_CONFIG,
),
),
# Dimmer
# https://developer.tuya.com/en/docs/iot/tgq?id=Kaof8ke9il4k4
"tgq": (
SelectEntityDescription(
key=DPCode.LED_TYPE_1,
name="Light Source Type",
device_class=DEVICE_CLASS_TUYA_LED_TYPE,
entity_category=ENTITY_CATEGORY_CONFIG,
),
SelectEntityDescription(
key=DPCode.LED_TYPE_2,
name="Light 2 Source Type",
device_class=DEVICE_CLASS_TUYA_LED_TYPE,
entity_category=ENTITY_CATEGORY_CONFIG,
),
),
}