mirror of
https://github.com/home-assistant/core.git
synced 2025-09-12 00:01:43 +02:00
Migrate unique_id only if monitor_id is present in Uptime Kuma (#150197)
This commit is contained in:
@@ -104,7 +104,12 @@ def async_migrate_entities_unique_ids(
|
||||
f"{registry_entry.config_entry_id}_"
|
||||
).removesuffix(f"_{registry_entry.translation_key}")
|
||||
if monitor := next(
|
||||
(m for m in metrics.values() if m.monitor_name == name), None
|
||||
(
|
||||
m
|
||||
for m in metrics.values()
|
||||
if m.monitor_name == name and m.monitor_id is not None
|
||||
),
|
||||
None,
|
||||
):
|
||||
entity_registry.async_update_entity(
|
||||
registry_entry.entity_id,
|
||||
|
Reference in New Issue
Block a user