Skip to content

Commit

Permalink
Fix "not-logged" edge cases for Comelit VEDO (#107741)
Browse files Browse the repository at this point in the history
  • Loading branch information
chemelli74 authored and frenck committed Jan 12, 2024
1 parent 4054797 commit 504e4a7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
8 changes: 2 additions & 6 deletions homeassistant/components/comelit/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,11 @@ async def _async_update_data(self) -> dict[str, Any]:
try:
await self.api.login()
return await self._async_update_system_data()
except exceptions.CannotConnect as err:
_LOGGER.warning("Connection error for %s", self._host)
await self.api.close()
raise UpdateFailed(f"Error fetching data: {repr(err)}") from err
except (exceptions.CannotConnect, exceptions.CannotRetrieveData) as err:
raise UpdateFailed(repr(err)) from err
except exceptions.CannotAuthenticate:
raise ConfigEntryAuthFailed

return {}

@abstractmethod
async def _async_update_system_data(self) -> dict[str, Any]:
"""Class method for updating data."""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/comelit/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/comelit",
"iot_class": "local_polling",
"loggers": ["aiocomelit"],
"requirements": ["aiocomelit==0.7.0"]
"requirements": ["aiocomelit==0.7.3"]
}
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ aiobafi6==0.9.0
aiobotocore==2.6.0

# homeassistant.components.comelit
aiocomelit==0.7.0
aiocomelit==0.7.3

# homeassistant.components.dhcp
aiodiscover==1.6.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ aiobafi6==0.9.0
aiobotocore==2.6.0

# homeassistant.components.comelit
aiocomelit==0.7.0
aiocomelit==0.7.3

# homeassistant.components.dhcp
aiodiscover==1.6.0
Expand Down

0 comments on commit 504e4a7

Please sign in to comment.