Skip to content

Commit 0144685

Browse files
committed
Allow deleting devices
1 parent 9cc4d4b commit 0144685

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

custom_components/victron_mqtt/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from homeassistant.const import EVENT_HOMEASSISTANT_STOP, Platform
88
from homeassistant.core import Event, HomeAssistant, ServiceCall
9+
from homeassistant.helpers import device_registry as dr, entity_registry as er
910
from homeassistant.helpers.typing import ConfigType
1011
from homeassistant.exceptions import HomeAssistantError
1112

@@ -137,3 +138,11 @@ async def async_unload_entry(hass: HomeAssistant, entry: VictronGxConfigEntry) -
137138
hub.unregister_all_new_metric_callbacks()
138139

139140
return True
141+
142+
async def async_remove_config_entry_device(
143+
hass: HomeAssistant,
144+
config_entry: VictronGxConfigEntry,
145+
device_entry: dr.DeviceEntry,
146+
) -> bool:
147+
"""Remove a device from the config entry."""
148+
return True

0 commit comments

Comments
 (0)