From 3875d11d6be4d433c712bd6d3e04814e03d60e5c Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Fri, 14 Jun 2024 02:26:19 +0200 Subject: [PATCH] Fix blocking metadata version call (#630) --- bellows/zigbee/application.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bellows/zigbee/application.py b/bellows/zigbee/application.py index 5b757bf0..3159f052 100644 --- a/bellows/zigbee/application.py +++ b/bellows/zigbee/application.py @@ -65,6 +65,7 @@ "54:EF:44": 0x115F, # Lumi } +LIB_VERSION = importlib.metadata.version("bellows") LOGGER = logging.getLogger(__name__) @@ -341,7 +342,7 @@ async def load_network_info(self, *, load_devices=False) -> None: can_rewrite_custom_eui64 = await ezsp.can_rewrite_custom_eui64() self.state.network_info = zigpy.state.NetworkInfo( - source=f"bellows@{importlib.metadata.version('bellows')}", + source=f"bellows@{LIB_VERSION}", extended_pan_id=zigpy.types.ExtendedPanId(nwk_params.extendedPanId), pan_id=zigpy.types.PanId(nwk_params.panId), nwk_update_id=zigpy.types.uint8_t(nwk_params.nwkUpdateId),