From 182de719d6c6d3f9f06a30facecf211baeaf3f55 Mon Sep 17 00:00:00 2001 From: xZetsubou Date: Fri, 7 Jun 2024 07:54:57 +0300 Subject: [PATCH] Fix dispatcher misuse warnings #264 --- custom_components/localtuya/coordinator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/localtuya/coordinator.py b/custom_components/localtuya/coordinator.py index 7945c68a4..0dc58ad5a 100644 --- a/custom_components/localtuya/coordinator.py +++ b/custom_components/localtuya/coordinator.py @@ -15,6 +15,7 @@ from homeassistant.helpers.dispatcher import ( async_dispatcher_connect, async_dispatcher_send, + dispatcher_send, ) from .core import pytuya @@ -443,7 +444,7 @@ def _shutdown_entities(self, now=None): if not self.connected: signal = f"localtuya_{self._device_config.id}" - async_dispatcher_send(self._hass, signal, None) + dispatcher_send(self._hass, signal, None) @callback def status_updated(self, status: dict):