From 8ac8fe6401ea4ccdc3d583a0166098d3c5126dcd Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Thu, 7 Apr 2022 15:18:27 -0400 Subject: [PATCH] solaar: handle devices with all-zero modelId --- lib/solaar/configuration.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/solaar/configuration.py b/lib/solaar/configuration.py index 8c9c8fe0..9fb1644a 100644 --- a/lib/solaar/configuration.py +++ b/lib/solaar/configuration.py @@ -173,8 +173,10 @@ _yaml.add_representer(_NamedInt, named_int_representer) # So new entries are not created for unseen off-line receiver-connected devices except for those with protocol 1.0 def persister(device): def match(wpid, serial, modelId, unitId, c): - return ((wpid and wpid == c.get(_KEY_WPID) and serial and serial == c.get(_KEY_SERIAL)) - or (modelId and modelId == c.get(_KEY_MODEL_ID) and unitId and unitId == c.get(_KEY_UNIT_ID))) + return ((wpid and wpid == c.get(_KEY_WPID) and serial and serial == c.get(_KEY_SERIAL)) or ( + modelId and modelId != '000000000000' and modelId == c.get(_KEY_MODEL_ID) and unitId + and unitId == c.get(_KEY_UNIT_ID) + )) if not _config: _load()