From 2cb622959837ab502f34a6cb683a09863319fd08 Mon Sep 17 00:00:00 2001 From: Elad Bar Date: Fri, 17 May 2024 12:27:17 +0300 Subject: [PATCH] Fix async dispatcher send --- CHANGELOG.md | 4 ++++ custom_components/shinobi/managers/rest_api.py | 6 ++---- custom_components/shinobi/managers/websockets.py | 6 ++---- custom_components/shinobi/manifest.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3878cab..6fd3f2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v3.0.9 + +- Fix async dispatcher send + ## v3.0.8 - Fix warning - StrEnum is a deprecated alias which will be removed in HA Core 2025.5. Use enum.StrEnum instead diff --git a/custom_components/shinobi/managers/rest_api.py b/custom_components/shinobi/managers/rest_api.py index 70c32d5..1d0d78b 100644 --- a/custom_components/shinobi/managers/rest_api.py +++ b/custom_components/shinobi/managers/rest_api.py @@ -12,7 +12,7 @@ from homeassistant.const import ATTR_DATE from homeassistant.core import HomeAssistant from homeassistant.helpers.aiohttp_client import async_create_clientsession -from homeassistant.helpers.dispatcher import async_dispatcher_send +from homeassistant.helpers.dispatcher import dispatcher_send from ..common.connectivity_status import ConnectivityStatus from ..common.consts import ( @@ -684,6 +684,4 @@ def _async_dispatcher_send(self, signal: str, *args: Any) -> None: ) else: - async_dispatcher_send( - self._hass, signal, self._config_manager.entry_id, *args - ) + dispatcher_send(self._hass, signal, self._config_manager.entry_id, *args) diff --git a/custom_components/shinobi/managers/websockets.py b/custom_components/shinobi/managers/websockets.py index a688a4c..5dee657 100644 --- a/custom_components/shinobi/managers/websockets.py +++ b/custom_components/shinobi/managers/websockets.py @@ -13,7 +13,7 @@ from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.aiohttp_client import async_create_clientsession -from homeassistant.helpers.dispatcher import async_dispatcher_send +from homeassistant.helpers.dispatcher import dispatcher_send from homeassistant.helpers.event import async_track_time_interval from ..common.connectivity_status import ConnectivityStatus @@ -653,6 +653,4 @@ def _async_dispatcher_send(self, signal: str, *args: Any) -> None: ) else: - async_dispatcher_send( - self._hass, signal, self._config_manager.entry_id, *args - ) + dispatcher_send(self._hass, signal, self._config_manager.entry_id, *args) diff --git a/custom_components/shinobi/manifest.json b/custom_components/shinobi/manifest.json index 754eddb..36b1fe7 100644 --- a/custom_components/shinobi/manifest.json +++ b/custom_components/shinobi/manifest.json @@ -9,5 +9,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/elad-bar/ha-shinobi/issues", "requirements": [], - "version": "3.0.8" + "version": "3.0.9" }