added light type, and formatting

This commit is contained in:
mischa 2019-11-02 08:59:13 +01:00
parent a1a54f01b4
commit 1713b5e5f0
1 changed files with 3 additions and 4 deletions

View File

@ -37,8 +37,7 @@ with urllib.request.urlopen(req, context=no_cert_check) as response:
content = response.read()
json_data = json.loads(content)
#p = re.compile("([a-fA-F0-9]{2}:?){8}")
#sensors = collections.defaultdict(list);
print(f"{'ID':>2s}: {'Name':<30s} Type")
print ("################################################################################")
for key in json_data:
print(f"{key}: {json_data[key]['name']}")
print(f"{key:>2s}: {json_data[key]['name']:<30s} {json_data[key]['type']}")