Add support for IoT Switches (tdq) in Tuya (#58952)
This commit is contained in:
parent
5315d7eb0a
commit
ab20bf4e9a
2 changed files with 41 additions and 0 deletions
|
@ -143,6 +143,22 @@ SELECTS: dict[str, tuple[SelectEntityDescription, ...]] = {
|
|||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
),
|
||||
# IoT Switch?
|
||||
# Note: Undocumented
|
||||
"tdq": (
|
||||
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,
|
||||
),
|
||||
),
|
||||
# Dimmer Switch
|
||||
# https://developer.tuya.com/en/docs/iot/categorytgkg?id=Kaiuz0ktx7m0o
|
||||
"tgkg": (
|
||||
|
|
|
@ -369,6 +369,31 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
|
|||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
),
|
||||
# IoT Switch?
|
||||
# Note: Undocumented
|
||||
"tdq": (
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_1,
|
||||
name="Switch 1",
|
||||
device_class=DEVICE_CLASS_OUTLET,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_2,
|
||||
name="Switch 2",
|
||||
device_class=DEVICE_CLASS_OUTLET,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.SWITCH_3,
|
||||
name="Switch 3",
|
||||
device_class=DEVICE_CLASS_OUTLET,
|
||||
),
|
||||
SwitchEntityDescription(
|
||||
key=DPCode.CHILD_LOCK,
|
||||
name="Child Lock",
|
||||
icon="mdi:account-lock",
|
||||
entity_category=ENTITY_CATEGORY_CONFIG,
|
||||
),
|
||||
),
|
||||
# Solar Light
|
||||
# https://developer.tuya.com/en/docs/iot/tynd?id=Kaof8j02e1t98
|
||||
"tyndj": (
|
||||
|
|
Loading…
Add table
Reference in a new issue