From 6ad33e6b925f7a53cd873afbe9656f556c7707bc Mon Sep 17 00:00:00 2001 From: BenPru <32298537+BenPru@users.noreply.github.com> Date: Sat, 2 Mar 2024 22:12:23 +0100 Subject: [PATCH] Fix non int minor number #243 --- custom_components/luxtronik/coordinator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/luxtronik/coordinator.py b/custom_components/luxtronik/coordinator.py index 9eebb85..dbc53f4 100644 --- a/custom_components/luxtronik/coordinator.py +++ b/custom_components/luxtronik/coordinator.py @@ -3,6 +3,7 @@ from __future__ import annotations import asyncio +import re from collections.abc import Awaitable, Callable, Coroutine, Mapping from functools import wraps import threading @@ -319,7 +320,7 @@ def firmware_version_minor(self) -> int: ver = self.firmware_version if ver is None: return 0 - return int(ver.split(".")[1]) + return int(re.sub('[^0-9]','', ver.split(".")[1])) def entity_visible(self, description: LuxtronikEntityDescription) -> bool: """Is description visible."""