mirror of
https://github.com/home-assistant/core.git
synced 2026-05-04 20:04:35 +02:00
Remove config entry from device instead of deleting in Uptime robot (#151557)
This commit is contained in:
committed by
Franck Nijhof
parent
869801b643
commit
6023a8e6b0
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user