diff --git a/custom_components/leafspy/__init__.py b/custom_components/leafspy/__init__.py index f753d4a..c522d89 100755 --- a/custom_components/leafspy/__init__.py +++ b/custom_components/leafspy/__init__.py @@ -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 @@ -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 diff --git a/custom_components/leafspy/manifest.json b/custom_components/leafspy/manifest.json old mode 100644 new mode 100755 index 4dfff4c..4f47e6a --- a/custom_components/leafspy/manifest.json +++ b/custom_components/leafspy/manifest.json @@ -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" }