From 60f6a2d81d893a520eb6457b865cfc85c3bbfb7b Mon Sep 17 00:00:00 2001 From: Guzz-T Date: Tue, 23 Dec 2025 22:39:12 +0100 Subject: [PATCH] Compare data field names case-insensitive There is no reason to pay attention to upper and lower case here. --- luxtronik/datatypes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/luxtronik/datatypes.py b/luxtronik/datatypes.py index a56666fa..750ba04b 100755 --- a/luxtronik/datatypes.py +++ b/luxtronik/datatypes.py @@ -54,9 +54,10 @@ def check_name(self, name): Check whether a name matches one of the supported entry names. The result string can be used to trigger a exception for obsolete names. """ - if name == self.name: + name_lower = name.lower() + if name_lower == self.name.lower(): return LUXTRONIK_NAME_CHECK_PREFERRED - elif name in self._names: + elif name_lower in (n.lower() for n in self._names): return LUXTRONIK_NAME_CHECK_OBSOLETE else: return LUXTRONIK_NAME_CHECK_NONE