commit 440a9b96ee7a2974aae8162ad1ec12fa7d08465e from: mischa date: Wed Nov 06 21:24:39 2019 UTC added formatting for C commit - e79b0f504452b6d3451671f465833257d3a8d153 commit + 440a9b96ee7a2974aae8162ad1ec12fa7d08465e blob - db7eae1e15fd1d1f2e843ae1d695e571aecee3dd blob + 2af898299dfd162483972368bcef449750472ea6 --- temperature.py +++ temperature.py @@ -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")