From 886f03dd71ea0ec2f5169848b47a1d2ff1b6b716 Mon Sep 17 00:00:00 2001 From: Michael <35783820+mib1185@users.noreply.github.com> Date: Mon, 1 Apr 2024 19:36:57 +0200 Subject: [PATCH] Apply late review of tankerkoenig (#114582) remove config entry from device, not device itself --- homeassistant/components/tankerkoenig/coordinator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/tankerkoenig/coordinator.py b/homeassistant/components/tankerkoenig/coordinator.py index b7a45b65d0a..458c629f422 100644 --- a/homeassistant/components/tankerkoenig/coordinator.py +++ b/homeassistant/components/tankerkoenig/coordinator.py @@ -101,7 +101,9 @@ class TankerkoenigDataUpdateCoordinator(DataUpdateCoordinator): for station_id in self._selected_stations ): _LOGGER.debug("Removing obsolete device entry %s", device.name) - device_reg.async_remove_device(device.id) + device_reg.async_update_device( + device.id, remove_config_entry_id=self.config_entry.entry_id + ) if len(self.stations) > 10: _LOGGER.warning(