Add broadlink lb2 support (#63530)

* Update const.py

* Update to support LB2 version smart bulbs in Broadlink integration

* Update const.py

Added Space.

* Update updater.py

Updated so that LB2 lights use the LB1 update manager.
This commit is contained in:
Mathew Verdouw 2022-02-19 06:39:29 +10:00 committed by GitHub
parent d3bb622a3c
commit 48e3f9584b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -31,7 +31,7 @@ DOMAINS_AND_TYPES = {
"SP4",
"SP4B",
},
Platform.LIGHT: {"LB1"},
Platform.LIGHT: {"LB1", "LB2"},
}
DEVICE_TYPES = set.union(*DOMAINS_AND_TYPES.values())

View File

@ -37,7 +37,7 @@ async def async_setup_entry(
device = hass.data[DOMAIN].devices[config_entry.entry_id]
lights = []
if device.api.type == "LB1":
if device.api.type in {"LB1", "LB2"}:
lights.append(BroadlinkLight(device))
async_add_entities(lights)

View File

@ -17,6 +17,7 @@ def get_update_manager(device):
"A1": BroadlinkA1UpdateManager,
"BG1": BroadlinkBG1UpdateManager,
"LB1": BroadlinkLB1UpdateManager,
"LB2": BroadlinkLB1UpdateManager,
"MP1": BroadlinkMP1UpdateManager,
"RM4MINI": BroadlinkRMUpdateManager,
"RM4PRO": BroadlinkRMUpdateManager,