mirror of
https://github.com/gryf/pywmtemp.git
synced 2025-12-19 12:18:02 +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:
|
else:
|
||||||
value = f'{value:5}'
|
value = f'{value:5}'
|
||||||
|
|
||||||
|
string = f"{value}".replace('°', '\\').upper()
|
||||||
|
|
||||||
string = f"{value}{item['unit']}".replace('°', '\\').upper()
|
|
||||||
if displacement:
|
if displacement:
|
||||||
string = ''.join([chr(ord(i) + displacement) for i in string])
|
string = ''.join([chr(ord(i) + displacement) for i in string])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user