Skip to content

Commit

Permalink
import helper directly
Browse files Browse the repository at this point in the history
  • Loading branch information
wtadler committed Aug 10, 2024
1 parent dbe8dbb commit f539dd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions custom_components/leafspy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +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 homeassistant.helpers.dispatcher import async_dispatcher_connect, async_dispatcher_send

from .config_flow import CONF_SECRET, DOMAIN, URL_LEAFSPY_PATH
from .device_tracker import async_handle_message
Expand Down Expand Up @@ -105,8 +105,7 @@ async def get(self, request):
if not hmac.compare_digest(message['pass'], context.secret):
raise Exception("Invalid password")

hass.helpers.dispatcher.async_dispatcher_send(
DOMAIN, hass, context, message)
async_dispatcher_send(DOMAIN, hass, context, message)

return Response(status=200, text='"status":"0"')
except Exception: # pylint: disable=broad-except
Expand Down
2 changes: 1 addition & 1 deletion custom_components/leafspy/manifest.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "local_push",
"issue_tracker": "https://github.com/jesserockz/ha-leafspy/issues",
"requirements": [],
"version": "0.2.2"
"version": "0.2.3"
}

0 comments on commit f539dd7

Please sign in to comment.