From dbfc27b5d921f38e16607230a356ccd9a99c5a50 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Wed, 26 Jun 2024 16:47:44 +0200 Subject: [PATCH] Fix blocking metadata version call (#257) --- zigpy_deconz/zigbee/application.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zigpy_deconz/zigbee/application.py b/zigpy_deconz/zigbee/application.py index b3294c6..ea5bac2 100644 --- a/zigpy_deconz/zigbee/application.py +++ b/zigpy_deconz/zigbee/application.py @@ -42,6 +42,7 @@ from zigpy_deconz.config import CONFIG_SCHEMA import zigpy_deconz.exception +LIB_VERSION = importlib.metadata.version("zigpy-deconz") LOGGER = logging.getLogger(__name__) CHANGE_NETWORK_POLL_TIME = 1 @@ -319,9 +320,7 @@ async def load_network_info(self, *, load_devices=False): node_info.version = f"{int(self._api.firmware_version):#010x}" - network_info.source = ( - f"zigpy-deconz@{importlib.metadata.version('zigpy-deconz')}" - ) + network_info.source = f"zigpy-deconz@{LIB_VERSION}" network_info.metadata = { "deconz": { "version": node_info.version,