Skip to content

Commit bf64e11

Browse files
authored
Migrate unique_id only if monitor_id is present in Uptime Kuma (#150197)
1 parent 823d20c commit bf64e11

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

homeassistant/components/uptime_kuma/coordinator.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,12 @@ def async_migrate_entities_unique_ids(
104104
f"{registry_entry.config_entry_id}_"
105105
).removesuffix(f"_{registry_entry.translation_key}")
106106
if monitor := next(
107-
(m for m in metrics.values() if m.monitor_name == name), None
107+
(
108+
m
109+
for m in metrics.values()
110+
if m.monitor_name == name and m.monitor_id is not None
111+
),
112+
None,
108113
):
109114
entity_registry.async_update_entity(
110115
registry_entry.entity_id,

0 commit comments

Comments
 (0)