longer names
This commit is contained in:
parent
640649c8da
commit
77e65f1970
|
@ -56,6 +56,7 @@ for key in json_data:
|
||||||
else:
|
else:
|
||||||
sensors[json_data[key]['uniqueid'][:-8]].append(key)
|
sensors[json_data[key]['uniqueid'][:-8]].append(key)
|
||||||
|
|
||||||
|
Overloop 1e verdieping sensor
|
||||||
for key in sensors:
|
for key in sensors:
|
||||||
for i in sensors[key]:
|
for i in sensors[key]:
|
||||||
if json_data.get(i)['type'] == 'ZLLPresence':
|
if json_data.get(i)['type'] == 'ZLLPresence':
|
||||||
|
@ -64,8 +65,8 @@ for key in sensors:
|
||||||
updated = json_data.get(i)['state']['lastupdated'][-8:]
|
updated = json_data.get(i)['state']['lastupdated'][-8:]
|
||||||
temperature = round((json_data.get(i)['state']['temperature'] / 100), 1)
|
temperature = round((json_data.get(i)['state']['temperature'] / 100), 1)
|
||||||
if verbose:
|
if verbose:
|
||||||
print (f"{name:<25s} - {temperature}C (updated: {updated} UTC)")
|
print (f"{name:<30s} - {temperature}C (updated: {updated} UTC)")
|
||||||
elif debug:
|
elif debug:
|
||||||
print (f"{name:<25s} - {temperature}C (updated: {updated} UTC - sensor: {i})")
|
print (f"{name:<30s} - {temperature}C (updated: {updated} UTC - sensor: {i})")
|
||||||
else:
|
else:
|
||||||
print (f"{name:<25s} - {temperature}C")
|
print (f"{name:<30s} - {temperature}C")
|
||||||
|
|
Loading…
Reference in New Issue