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

This commit is contained in:
Franck Nijhof 2022-02-25 17:11:22 +01:00 committed by GitHub
parent 5edb4cbdc6
commit c62a3c4f0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

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"

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",