From d15976d9f777bce7dff11868c88fab21a8e66e38 Mon Sep 17 00:00:00 2001 From: Kuba Sawulski Date: Sun, 11 Aug 2024 11:16:46 +0200 Subject: [PATCH] Fix mqtt --- pyhon/hon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyhon/hon.py b/pyhon/hon.py index c050980..92f5532 100644 --- a/pyhon/hon.py +++ b/pyhon/hon.py @@ -35,7 +35,7 @@ class Hon: self._mobile_id: str = mobile_id self._refresh_token: str = refresh_token self._mqtt_client: MQTTClient | None = None - self._notify_function: Optional[Callable[[Any], None]] = None + self._notify_function: Optional[Callable[[], None]] = None async def __aenter__(self) -> Self: return await self.create() @@ -127,7 +127,7 @@ class Hon: def notify(self) -> None: if self._notify_function: - self._notify_function(None) + self._notify_function() async def close(self) -> None: await self.api.close()