Add support for 8-gang switches to Tuya (#67218)

This commit is contained in:
Franck Nijhof
2022-02-25 10:01:03 -08:00
committed by Paulus Schoutsen
parent 549756218b
commit 2c075a00c7
2 changed files with 12 additions and 0 deletions
+2
View File
@@ -329,6 +329,8 @@ class DPCode(StrEnum):
SWITCH_4 = "switch_4" # Switch 4
SWITCH_5 = "switch_5" # Switch 5
SWITCH_6 = "switch_6" # Switch 6
SWITCH_7 = "switch_7" # Switch 7
SWITCH_8 = "switch_8" # Switch 8
SWITCH_BACKLIGHT = "switch_backlight" # Backlight switch
SWITCH_CHARGE = "switch_charge"
SWITCH_CONTROLLER = "switch_controller"
+10
View File
@@ -137,6 +137,16 @@ SWITCHES: dict[str, tuple[SwitchEntityDescription, ...]] = {
name="Switch 6",
device_class=SwitchDeviceClass.OUTLET,
),
SwitchEntityDescription(
key=DPCode.SWITCH_7,
name="Switch 7",
device_class=SwitchDeviceClass.OUTLET,
),
SwitchEntityDescription(
key=DPCode.SWITCH_8,
name="Switch 8",
device_class=SwitchDeviceClass.OUTLET,
),
SwitchEntityDescription(
key=DPCode.SWITCH_USB1,
name="USB 1",