adding check for battery bug

This commit is contained in:
mischa 2019-11-06 21:25:03 +01:00
parent 5883ed9570
commit 04e65a6c5f
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ p = re.compile("([a-fA-F0-9]{2}:?){8}")
sensors = collections.defaultdict(list);
for key in json_data:
if "uniqueid" in json_data[key]:
if "uniqueid" in json_data[key] and json_data[key]['state']:
if p.search(json_data[key]['uniqueid']):
if json_data[key]['type'] == 'ZLLPresence':
sensors[json_data[key]['uniqueid'][:-8]].insert(0, key)