max string length for name, 32

This commit is contained in:
mischa 2019-11-03 17:08:36 +01:00
parent 22840c19be
commit 71fd1e1c58
1 changed files with 3 additions and 3 deletions

View File

@ -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:<30s} - {temperature}C (updated: {updated} UTC)")
print (f"{name:<32s} - {temperature}C (updated: {updated} UTC)")
elif debug:
print (f"{name:<30s} - {temperature}C (updated: {updated} UTC - sensor: {i})")
print (f"{name:<32s} - {temperature}C (updated: {updated} UTC - sensor: {i})")
else:
print (f"{name:<30s} - {temperature}C")
print (f"{name:<32s} - {temperature}C")