Bump python-fritzhome to 0.6.11 (#115904)

This commit is contained in:
Michael 2024-04-23 17:39:44 +02:00 committed by GitHub
parent d4b801af32
commit 10228ee1a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 14 deletions

View File

@ -82,9 +82,9 @@ class FritzboxDataUpdateCoordinator(DataUpdateCoordinator[FritzboxCoordinatorDat
def _update_fritz_devices(self) -> FritzboxCoordinatorData:
"""Update all fritzbox device data."""
try:
self.fritz.update_devices()
self.fritz.update_devices(ignore_removed=False)
if self.has_templates:
self.fritz.update_templates()
self.fritz.update_templates(ignore_removed=False)
except RequestConnectionError as ex:
raise UpdateFailed from ex
except HTTPError:
@ -93,9 +93,9 @@ class FritzboxDataUpdateCoordinator(DataUpdateCoordinator[FritzboxCoordinatorDat
self.fritz.login()
except LoginError as ex:
raise ConfigEntryAuthFailed from ex
self.fritz.update_devices()
self.fritz.update_devices(ignore_removed=False)
if self.has_templates:
self.fritz.update_templates()
self.fritz.update_templates(ignore_removed=False)
devices = self.fritz.get_devices()
device_data = {}
@ -124,14 +124,18 @@ class FritzboxDataUpdateCoordinator(DataUpdateCoordinator[FritzboxCoordinatorDat
self.new_devices = device_data.keys() - self.data.devices.keys()
self.new_templates = template_data.keys() - self.data.templates.keys()
if (
self.data.devices.keys() - device_data.keys()
or self.data.templates.keys() - template_data.keys()
):
self.cleanup_removed_devices(list(device_data) + list(template_data))
return FritzboxCoordinatorData(devices=device_data, templates=template_data)
async def _async_update_data(self) -> FritzboxCoordinatorData:
"""Fetch all device data."""
return await self.hass.async_add_executor_job(self._update_fritz_devices)
new_data = await self.hass.async_add_executor_job(self._update_fritz_devices)
if (
self.data.devices.keys() - new_data.devices.keys()
or self.data.templates.keys() - new_data.templates.keys()
):
self.cleanup_removed_devices(
list(new_data.devices) + list(new_data.templates)
)
return new_data

View File

@ -8,7 +8,7 @@
"iot_class": "local_polling",
"loggers": ["pyfritzhome"],
"quality_scale": "gold",
"requirements": ["pyfritzhome==0.6.10"],
"requirements": ["pyfritzhome==0.6.11"],
"ssdp": [
{
"st": "urn:schemas-upnp-org:device:fritzbox:1"

View File

@ -1836,7 +1836,7 @@ pyforked-daapd==0.1.14
pyfreedompro==1.1.0
# homeassistant.components.fritzbox
pyfritzhome==0.6.10
pyfritzhome==0.6.11
# homeassistant.components.ifttt
pyfttt==0.3

View File

@ -1432,7 +1432,7 @@ pyforked-daapd==0.1.14
pyfreedompro==1.1.0
# homeassistant.components.fritzbox
pyfritzhome==0.6.10
pyfritzhome==0.6.11
# homeassistant.components.ifttt
pyfttt==0.3