added formatting for C
This commit is contained in:
parent
e79b0f5044
commit
440a9b96ee
@ -64,8 +64,8 @@ for key in sensors:
|
||||
updated = json_data.get(i)['state']['lastupdated'][-8:]
|
||||
temperature = round((json_data.get(i)['state']['temperature'] / 100), 1)
|
||||
if verbose:
|
||||
print (f"{name:<32s} - {temperature}C (updated: {updated} UTC)")
|
||||
print (f"{name:<32s} - {temperature:>4}C (updated: {updated} UTC)")
|
||||
elif debug:
|
||||
print (f"{name:<32s} - {temperature}C (updated: {updated} UTC - sensor: {i})")
|
||||
print (f"{name:<32s} - {temperature:>4}C (updated: {updated} UTC - sensor: {i})")
|
||||
else:
|
||||
print (f"{name:<32s} - {temperature}C")
|
||||
print (f"{name:<32s} - {temperature:>4}C")
|
||||
|
Loading…
Reference in New Issue
Block a user