Skip to content

Commit

Permalink
fix unload_entry
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrike committed May 28, 2024
1 parent 6c59c80 commit cfdf377
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions homeassistant/components/point/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ async def async_setup_webhook(
async def async_unload_entry(hass: HomeAssistant, entry: PointConfigEntry) -> bool:
"""Unload a config entry."""
if unload_ok := await hass.config_entries.async_unload_platforms(entry, PLATFORMS):
webhook.async_unregister(hass, entry.data[CONF_WEBHOOK_ID])
session: PointSession = hass.data[DOMAIN].pop(entry)
await session.remove_webhook()

session: PointSession = hass.data[DOMAIN].pop(entry.entry_id)
if CONF_WEBHOOK_ID in entry.data:
webhook.async_unregister(hass, entry.data[CONF_WEBHOOK_ID])
await session.remove_webhook()
return unload_ok


Expand Down

0 comments on commit cfdf377

Please sign in to comment.