mirror of
https://github.com/gryf/pywmtemp.git
synced 2025-12-18 20:00:18 +01:00
If value for the reading is too long, trim it.
I know, that this is kind of naive implementation, but in case of temperatures there is a more serious issue than trimming, if any of the HW component exceeds 1000 Celsius degrees ;)
This commit is contained in:
@@ -265,8 +265,8 @@ class SensorDockApp(wmdocklib.DockApp):
|
||||
else:
|
||||
value = f'{value:5}'
|
||||
|
||||
string = f"{value}".replace('°', '\\').upper()
|
||||
|
||||
string = f"{value}{item['unit']}".replace('°', '\\').upper()
|
||||
if displacement:
|
||||
string = ''.join([chr(ord(i) + displacement) for i in string])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user