Add Dimmer Switch (tgkg) device support to Tuya (#58134)
This commit is contained in:
parent
c204196a7a
commit
7353ea5416
5 changed files with 77 additions and 1 deletions
|
@ -16,6 +16,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
from . import HomeAssistantTuyaData
|
||||
from .base import EnumTypeData, TuyaEntity
|
||||
from .const import (
|
||||
DEVICE_CLASS_TUYA_LED_TYPE,
|
||||
DEVICE_CLASS_TUYA_LIGHT_MODE,
|
||||
DEVICE_CLASS_TUYA_RELAY_STATUS,
|
||||
DOMAIN,
|
||||
|
@ -82,6 +83,40 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
|||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
),
|
||||
# Dimmer Switch
|
||||
# https://developer.tuya.com/en/docs/iot/categorytgkg?id=Kaiuz0ktx7m0o
|
||||
"tgkg": (
|
||||
SelectEntityDescription(
|
||||
key=DPCode.RELAY_STATUS,
|
||||
name="Power on Behavior",
|
||||
device_class=DEVICE_CLASS_TUYA_RELAY_STATUS,
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LIGHT_MODE,
|
||||
name="Indicator Light Mode",
|
||||
device_class=DEVICE_CLASS_TUYA_LIGHT_MODE,
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
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,
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key=DPCode.LED_TYPE_3,
|
||||
name="Light 3 Source Type",
|
||||
device_class=DEVICE_CLASS_TUYA_LED_TYPE,
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue