Skip to content

Commit

Permalink
address deprecation of indirect dispatcher import
Browse files Browse the repository at this point in the history
Fixes #25
  • Loading branch information
wtadler committed Aug 8, 2024
1 parent 62124e3 commit 5e07a3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/leafspy/__init__.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from homeassistant.components.http.view import HomeAssistantView
from homeassistant.config_entries import SOURCE_IMPORT, ConfigEntry
from homeassistant.core import callback, HomeAssistant
from homeassistant.helpers.dispatcher import async_dispatcher_connect

from .config_flow import CONF_SECRET, DOMAIN, URL_LEAFSPY_PATH
from .device_tracker import async_handle_message
Expand Down Expand Up @@ -43,8 +44,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
)

hass.data[DOMAIN]['unsub'] = \
hass.helpers.dispatcher.async_dispatcher_connect(
DOMAIN, async_handle_message)
async_dispatcher_connect(hass, DOMAIN, async_handle_message)

return True

Expand Down

0 comments on commit 5e07a3b

Please sign in to comment.