diff --git a/homeassistant/components/velbus/__init__.py b/homeassistant/components/velbus/__init__.py index e7f24bad0123..f564a14fb0e4 100644 --- a/homeassistant/components/velbus/__init__.py +++ b/homeassistant/components/velbus/__init__.py @@ -192,7 +192,7 @@ async def async_remove_config_entry_device( on the bus, it may be recreated when the integration is reloaded or started again. """ - if config_entry.entry_id not in device_entry.config_entries: + if device_entry.config_entry_id != config_entry.entry_id: return False dev_reg = dr.async_get(hass) for sub_device in dr.async_entries_for_config_entry(dev_reg, config_entry.entry_id):