Remove config entry from device instead of deleting in Uptime robot (#151557)

This commit is contained in:
Simone Chemelli
2025-09-02 13:06:07 +02:00
committed by Franck Nijhof
parent 869801b643
commit 6023a8e6b0
2 changed files with 5 additions and 4 deletions
@@ -65,7 +65,10 @@ class UptimeRobotDataUpdateCoordinator(DataUpdateCoordinator[list[UptimeRobotMon
if device := device_registry.async_get_device(
identifiers={(DOMAIN, monitor_id)}
):
device_registry.async_remove_device(device.id)
device_registry.async_update_device(
device_id=device.id,
remove_config_entry_id=self.config_entry.entry_id,
)
# If there are new monitors, we should reload the config entry so we can
# create new devices and entities.
@@ -74,9 +74,7 @@ rules:
repair-issues:
status: exempt
comment: no known use cases for repair issues or flows, yet
stale-devices:
status: todo
comment: We should remove the config entry from the device rather than remove the device
stale-devices: done
# Platinum
async-dependency: done