solaar: handle devices with all-zero modelId
This commit is contained in:
parent
37bc1d7bd0
commit
8ac8fe6401
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue