Bump Broadlink to 0.19.0 (#115742)
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
11931cdb56
commit
7188d62340
7 changed files with 18 additions and 5 deletions
|
@ -9,6 +9,7 @@ DOMAINS_AND_TYPES = {
|
|||
Platform.REMOTE: {"RM4MINI", "RM4PRO", "RMMINI", "RMMINIB", "RMPRO"},
|
||||
Platform.SENSOR: {
|
||||
"A1",
|
||||
"MP1S",
|
||||
"RM4MINI",
|
||||
"RM4PRO",
|
||||
"RMPRO",
|
||||
|
@ -20,6 +21,7 @@ DOMAINS_AND_TYPES = {
|
|||
Platform.SWITCH: {
|
||||
"BG1",
|
||||
"MP1",
|
||||
"MP1S",
|
||||
"RM4MINI",
|
||||
"RM4PRO",
|
||||
"RMMINI",
|
||||
|
|
|
@ -38,5 +38,5 @@
|
|||
"documentation": "https://www.home-assistant.io/integrations/broadlink",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["broadlink"],
|
||||
"requirements": ["broadlink==0.18.3"]
|
||||
"requirements": ["broadlink==0.19.0"]
|
||||
}
|
||||
|
|
|
@ -373,7 +373,7 @@ class BroadlinkRemote(BroadlinkEntity, RemoteEntity, RestoreEntity):
|
|||
start_time = dt_util.utcnow()
|
||||
while (dt_util.utcnow() - start_time) < LEARNING_TIMEOUT:
|
||||
await asyncio.sleep(1)
|
||||
found = await device.async_request(device.api.check_frequency)
|
||||
found = await device.async_request(device.api.check_frequency)[0]
|
||||
if found:
|
||||
break
|
||||
else:
|
||||
|
|
|
@ -129,7 +129,7 @@ async def async_setup_entry(
|
|||
elif device.api.type == "BG1":
|
||||
switches.extend(BroadlinkBG1Slot(device, slot) for slot in range(1, 3))
|
||||
|
||||
elif device.api.type == "MP1":
|
||||
elif device.api.type in {"MP1", "MP1S"}:
|
||||
switches.extend(BroadlinkMP1Slot(device, slot) for slot in range(1, 5))
|
||||
|
||||
async_add_entities(switches)
|
||||
|
|
|
@ -21,6 +21,7 @@ def get_update_manager(device):
|
|||
"LB1": BroadlinkLB1UpdateManager,
|
||||
"LB2": BroadlinkLB1UpdateManager,
|
||||
"MP1": BroadlinkMP1UpdateManager,
|
||||
"MP1S": BroadlinkMP1SUpdateManager,
|
||||
"RM4MINI": BroadlinkRMUpdateManager,
|
||||
"RM4PRO": BroadlinkRMUpdateManager,
|
||||
"RMMINI": BroadlinkRMUpdateManager,
|
||||
|
@ -112,6 +113,16 @@ class BroadlinkMP1UpdateManager(BroadlinkUpdateManager):
|
|||
return await self.device.async_request(self.device.api.check_power)
|
||||
|
||||
|
||||
class BroadlinkMP1SUpdateManager(BroadlinkUpdateManager):
|
||||
"""Manages updates for Broadlink MP1 devices."""
|
||||
|
||||
async def async_fetch_data(self):
|
||||
"""Fetch data from the device."""
|
||||
power = await self.device.async_request(self.device.api.check_power)
|
||||
sensors = await self.device.async_request(self.device.api.get_state)
|
||||
return {**power, **sensors}
|
||||
|
||||
|
||||
class BroadlinkRMUpdateManager(BroadlinkUpdateManager):
|
||||
"""Manages updates for Broadlink remotes."""
|
||||
|
||||
|
|
|
@ -601,7 +601,7 @@ boto3==1.34.51
|
|||
bring-api==0.5.7
|
||||
|
||||
# homeassistant.components.broadlink
|
||||
broadlink==0.18.3
|
||||
broadlink==0.19.0
|
||||
|
||||
# homeassistant.components.brother
|
||||
brother==4.1.0
|
||||
|
|
|
@ -512,7 +512,7 @@ boschshcpy==0.2.91
|
|||
bring-api==0.5.7
|
||||
|
||||
# homeassistant.components.broadlink
|
||||
broadlink==0.18.3
|
||||
broadlink==0.19.0
|
||||
|
||||
# homeassistant.components.brother
|
||||
brother==4.1.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue