Add support for IoT Switches (tdq) in Tuya (#58952)

This commit is contained in:
Franck Nijhof 2021-11-02 19:27:46 +01:00 committed by GitHub
parent 5315d7eb0a
commit ab20bf4e9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 0 deletions

View file

@ -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": (