Skip to content

Commit

Permalink
debug cleanup entities
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed Feb 15, 2024
1 parent 4baccf8 commit 20c5f36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions custom_components/eltako/eltako_integration_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def cleanup_unavailable_entities(hass: HomeAssistant):
for e in hass.config_entries.async_entries():
LOGGER.debug(f"CONFIG ENTRIES: entry_id {e.entry_id}, unique_id: {e.unique_id}")

# dr.async_cleanup(hass, device_reg, entity_registry)
dr.async_cleanup(hass, device_reg, entity_registry)


async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
Expand Down Expand Up @@ -152,14 +152,14 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b
await usb_gateway.async_setup()
set_gateway_to_hass(hass, usb_gateway)

cleanup_unavailable_entities(hass)

hass.data[DATA_ELTAKO][DATA_ENTITIES] = {}
for platform in PLATFORMS:
hass.async_create_task(
hass.config_entries.async_forward_entry_setup(config_entry, platform)
)

cleanup_unavailable_entities(hass)

return True

async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool:
Expand Down

0 comments on commit 20c5f36

Please sign in to comment.