Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #487 from Thomas55555/fix-unloading
Browse files Browse the repository at this point in the history
fix unloading
  • Loading branch information
Thomas55555 authored Jun 10, 2023
2 parents 81dd01a + 9d9ddc3 commit ed2b742
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/husqvarna_automower/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Handle unload of an entry."""
session = hass.data[DOMAIN][entry.entry_id]
await session.close()
coordinator = hass.data[DOMAIN][entry.entry_id]
await coordinator.session.close()
unload_ok = await hass.config_entries.async_unload_platforms(entry, PLATFORMS)
if unload_ok:
hass.data[DOMAIN].pop(entry.entry_id)
Expand Down

0 comments on commit ed2b742

Please sign in to comment.