Skip to content

Commit

Permalink
Unload cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jul 22, 2024
1 parent a5a1cf2 commit 5f9520b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions custom_components/healthchecksio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ async def async_unload_entry(
hass: core.HomeAssistant, config_entry: config_entries.ConfigEntry
) -> bool:
"""Unload a config entry."""
unload_ok = await hass.config_entries.async_forward_entry_unload(
config_entry, Platform.BINARY_SENSOR
)
if unload_ok:
if unload_ok := await hass.config_entries.async_unload_platforms(
config_entry, PLATFORMS
):
hass.data.pop(DOMAIN_DATA, None)
LOGGER.info("Successfully removed the healthchecksio integration")
return unload_ok
Expand Down

0 comments on commit 5f9520b

Please sign in to comment.