mirror of
https://github.com/home-assistant/core.git
synced 2025-07-07 21:37:07 +00:00
Improve Comelit login with PIN (#100860)
* improve login * library bump
This commit is contained in:
parent
0afb060c24
commit
db5943ad6d
@ -71,16 +71,14 @@ class ComelitSerialBridge(DataUpdateCoordinator):
|
||||
async def _async_update_data(self) -> dict[str, Any]:
|
||||
"""Update router data."""
|
||||
_LOGGER.debug("Polling Comelit Serial Bridge host: %s", self._host)
|
||||
logged = False
|
||||
try:
|
||||
logged = await self.api.login()
|
||||
except (asyncio.exceptions.TimeoutError, aiohttp.ClientConnectorError) as err:
|
||||
_LOGGER.warning("Connection error for %s", self._host)
|
||||
raise UpdateFailed(f"Error fetching data: {repr(err)}") from err
|
||||
finally:
|
||||
if not logged:
|
||||
raise ConfigEntryAuthFailed
|
||||
|
||||
if not logged:
|
||||
raise ConfigEntryAuthFailed
|
||||
|
||||
devices_data = await self.api.get_all_devices()
|
||||
await self.api.logout()
|
||||
|
||||
return devices_data
|
||||
return await self.api.get_all_devices()
|
||||
|
@ -6,5 +6,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/comelit",
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["aiocomelit"],
|
||||
"requirements": ["aiocomelit==0.0.8"]
|
||||
"requirements": ["aiocomelit==0.0.9"]
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ aiobafi6==0.9.0
|
||||
aiobotocore==2.6.0
|
||||
|
||||
# homeassistant.components.comelit
|
||||
aiocomelit==0.0.8
|
||||
aiocomelit==0.0.9
|
||||
|
||||
# homeassistant.components.dhcp
|
||||
aiodiscover==1.5.1
|
||||
|
@ -191,7 +191,7 @@ aiobafi6==0.9.0
|
||||
aiobotocore==2.6.0
|
||||
|
||||
# homeassistant.components.comelit
|
||||
aiocomelit==0.0.8
|
||||
aiocomelit==0.0.9
|
||||
|
||||
# homeassistant.components.dhcp
|
||||
aiodiscover==1.5.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user