Address late Withings review (#102075)
This commit is contained in:
parent
b4295e909c
commit
24afbf3ae4
2 changed files with 3 additions and 3 deletions
|
@ -40,6 +40,6 @@ async def async_get_config_entry_diagnostics(
|
|||
"has_valid_external_webhook_url": has_valid_external_webhook_url,
|
||||
"has_cloudhooks": has_cloudhooks,
|
||||
"webhooks_connected": measurement_coordinator.webhooks_connected,
|
||||
"received_measurements": list(measurement_coordinator.data.keys()),
|
||||
"received_measurements": list(measurement_coordinator.data),
|
||||
"received_sleep_data": sleep_coordinator.data is not None,
|
||||
}
|
||||
|
|
|
@ -406,7 +406,7 @@ async def async_setup_entry(
|
|||
DOMAIN
|
||||
][entry.entry_id][MEASUREMENT_COORDINATOR]
|
||||
|
||||
current_measurement_types = set(measurement_coordinator.data.keys())
|
||||
current_measurement_types = set(measurement_coordinator.data)
|
||||
|
||||
entities: list[SensorEntity] = []
|
||||
entities.extend(
|
||||
|
@ -419,7 +419,7 @@ async def async_setup_entry(
|
|||
|
||||
def _async_measurement_listener() -> None:
|
||||
"""Listen for new measurements and add sensors if they did not exist."""
|
||||
received_measurement_types = set(measurement_coordinator.data.keys())
|
||||
received_measurement_types = set(measurement_coordinator.data)
|
||||
new_measurement_types = received_measurement_types - current_measurement_types
|
||||
if new_measurement_types:
|
||||
current_measurement_types.update(new_measurement_types)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue