From 7378e680ba4836952ad3755d29dd277b3be1c7b4 Mon Sep 17 00:00:00 2001 From: mischa Date: Wed, 6 Nov 2019 21:31:00 +0100 Subject: [PATCH] adding check for battery bug --- get-sensors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-sensors.py b/get-sensors.py index 460b0d5..4394947 100755 --- a/get-sensors.py +++ b/get-sensors.py @@ -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] and json_data[key]['state']['presence']: + if "uniqueid" in json_data[key]: if p.search(json_data[key]['uniqueid']): if json_data[key]['type'] == 'ZLLPresence': sensors[json_data[key]['uniqueid'][:-8]].insert(0, key)