mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 16:57:10 +00:00
Fix "not-logged" edge cases for Comelit VEDO (#107741)
This commit is contained in:
parent
e7628d23d2
commit
79254c6867
@ -81,15 +81,11 @@ class ComelitBaseCoordinator(DataUpdateCoordinator[dict[str, Any]]):
|
|||||||
try:
|
try:
|
||||||
await self.api.login()
|
await self.api.login()
|
||||||
return await self._async_update_system_data()
|
return await self._async_update_system_data()
|
||||||
except exceptions.CannotConnect as err:
|
except (exceptions.CannotConnect, exceptions.CannotRetrieveData) as err:
|
||||||
_LOGGER.warning("Connection error for %s", self._host)
|
raise UpdateFailed(repr(err)) from err
|
||||||
await self.api.close()
|
|
||||||
raise UpdateFailed(f"Error fetching data: {repr(err)}") from err
|
|
||||||
except exceptions.CannotAuthenticate:
|
except exceptions.CannotAuthenticate:
|
||||||
raise ConfigEntryAuthFailed
|
raise ConfigEntryAuthFailed
|
||||||
|
|
||||||
return {}
|
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
async def _async_update_system_data(self) -> dict[str, Any]:
|
async def _async_update_system_data(self) -> dict[str, Any]:
|
||||||
"""Class method for updating data."""
|
"""Class method for updating data."""
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
"documentation": "https://www.home-assistant.io/integrations/comelit",
|
"documentation": "https://www.home-assistant.io/integrations/comelit",
|
||||||
"iot_class": "local_polling",
|
"iot_class": "local_polling",
|
||||||
"loggers": ["aiocomelit"],
|
"loggers": ["aiocomelit"],
|
||||||
"requirements": ["aiocomelit==0.7.0"]
|
"requirements": ["aiocomelit==0.7.3"]
|
||||||
}
|
}
|
||||||
|
@ -215,7 +215,7 @@ aiobafi6==0.9.0
|
|||||||
aiobotocore==2.6.0
|
aiobotocore==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.comelit
|
# homeassistant.components.comelit
|
||||||
aiocomelit==0.7.0
|
aiocomelit==0.7.3
|
||||||
|
|
||||||
# homeassistant.components.dhcp
|
# homeassistant.components.dhcp
|
||||||
aiodiscover==1.6.0
|
aiodiscover==1.6.0
|
||||||
|
@ -194,7 +194,7 @@ aiobafi6==0.9.0
|
|||||||
aiobotocore==2.6.0
|
aiobotocore==2.6.0
|
||||||
|
|
||||||
# homeassistant.components.comelit
|
# homeassistant.components.comelit
|
||||||
aiocomelit==0.7.0
|
aiocomelit==0.7.3
|
||||||
|
|
||||||
# homeassistant.components.dhcp
|
# homeassistant.components.dhcp
|
||||||
aiodiscover==1.6.0
|
aiodiscover==1.6.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user