Skip to content

Commit

Permalink
Fix unload in services.py
Browse files Browse the repository at this point in the history
Fixes #482
  • Loading branch information
wlcrs authored Sep 22, 2023
1 parent 9a65fff commit 4354807
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ async def async_setup_services( # noqa: C901

async def async_cleanup_services( hass: HomeAssistant):
"""Cleanup all Huawei Solar service (if all config entries unloaded)"""
if len(hass.data[DOMAIN] == 1):
if len(hass.data[DOMAIN]) == 1:
for service in ALL_SERVICES:
if hass.services.has_service(DOMAIN, service):
hass.services.async_remove(DOMAIN, service)
hass.services.async_remove(DOMAIN, service)

0 comments on commit 4354807

Please sign in to comment.