added description
This commit is contained in:
parent
cd0be7d7ba
commit
eb78856c45
@ -2,6 +2,7 @@
|
||||
#
|
||||
# Copyright 2019, Mischa Peters <mischa AT high5 DOT nl>, High5!.
|
||||
# Version 1.0 - 20191028
|
||||
# Version 1.1 - 20191106 - added battery status
|
||||
#
|
||||
# Get all sensor IDs (ZLLPresence, ZLLLightLevel and ZLLTemperature)
|
||||
# grouped by ZLLPresence name
|
||||
@ -58,9 +59,9 @@ for key in json_data:
|
||||
for key in sensors:
|
||||
for i in sensors[key]:
|
||||
if json_data.get(i)['type'] == 'ZLLPresence':
|
||||
print(json_data.get(i)['name'])
|
||||
print(f"\t{i}: {json_data.get(i)['productname']}")
|
||||
print(f"{json_data.get(i)['name']} ({json_data.get(i)['config']['battery']}%)")
|
||||
print(f"{i:>5s}: {json_data.get(i)['productname']}")
|
||||
if json_data.get(i)['type'] == 'ZLLLightLevel':
|
||||
print(f"\t{i}: {json_data.get(i)['productname']}")
|
||||
print(f"{i:>5s}: {json_data.get(i)['productname']}")
|
||||
if json_data.get(i)['type'] == 'ZLLTemperature':
|
||||
print(f"\t{i}: {json_data.get(i)['productname']}")
|
||||
print(f"{i:>5s}: {json_data.get(i)['productname']}")
|
||||
|
Loading…
Reference in New Issue
Block a user