mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 22:07:10 +00:00
Update pydiscovergy to 2.0.3 (#97509)
* Update pydiscovergy to 2.0.3 * Fix mypy * Fix tests
This commit is contained in:
parent
9df1805b3b
commit
dba6330fc8
@ -50,9 +50,9 @@ class DiscovergyUpdateCoordinator(DataUpdateCoordinator[Reading]):
|
||||
return await self.discovergy_client.meter_last_reading(self.meter.meter_id)
|
||||
except AccessTokenExpired as err:
|
||||
raise ConfigEntryAuthFailed(
|
||||
f"Auth expired while fetching last reading for meter {self.meter.get_meter_id()}"
|
||||
f"Auth expired while fetching last reading for meter {self.meter.meter_id}"
|
||||
) from err
|
||||
except HTTPError as err:
|
||||
raise UpdateFailed(
|
||||
f"Error while fetching last reading for meter {self.meter.get_meter_id()}"
|
||||
f"Error while fetching last reading for meter {self.meter.meter_id}"
|
||||
) from err
|
||||
|
@ -1,6 +1,7 @@
|
||||
"""Diagnostics support for discovergy."""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import asdict
|
||||
from typing import Any
|
||||
|
||||
from pydiscovergy.models import Meter
|
||||
@ -36,11 +37,11 @@ async def async_get_config_entry_diagnostics(
|
||||
|
||||
for meter in meters:
|
||||
# make a dict of meter data and redact some data
|
||||
flattened_meter.append(async_redact_data(meter.__dict__, TO_REDACT_METER))
|
||||
flattened_meter.append(async_redact_data(asdict(meter), TO_REDACT_METER))
|
||||
|
||||
# get last reading for meter and make a dict of it
|
||||
coordinator = data.coordinators[meter.meter_id]
|
||||
last_readings[meter.meter_id] = coordinator.data.__dict__
|
||||
last_readings[meter.meter_id] = asdict(coordinator.data)
|
||||
|
||||
return {
|
||||
"entry": async_redact_data(entry.as_dict(), TO_REDACT_CONFIG_ENTRY),
|
||||
|
@ -6,5 +6,5 @@
|
||||
"documentation": "https://www.home-assistant.io/integrations/discovergy",
|
||||
"integration_type": "hub",
|
||||
"iot_class": "cloud_polling",
|
||||
"requirements": ["pydiscovergy==2.0.1"]
|
||||
"requirements": ["pydiscovergy==2.0.3"]
|
||||
}
|
||||
|
@ -1638,7 +1638,7 @@ pydelijn==1.1.0
|
||||
pydexcom==0.2.3
|
||||
|
||||
# homeassistant.components.discovergy
|
||||
pydiscovergy==2.0.1
|
||||
pydiscovergy==2.0.3
|
||||
|
||||
# homeassistant.components.doods
|
||||
pydoods==1.0.2
|
||||
|
@ -1217,7 +1217,7 @@ pydeconz==113
|
||||
pydexcom==0.2.3
|
||||
|
||||
# homeassistant.components.discovergy
|
||||
pydiscovergy==2.0.1
|
||||
pydiscovergy==2.0.3
|
||||
|
||||
# homeassistant.components.android_ip_webcam
|
||||
pydroid-ipcam==2.0.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user