mirror of
https://github.com/gryf/pywmtemp.git
synced 2026-11-25 01:06:55 +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:
1 parent
d02ecefdf3
commit
580dc45c2a
1 file changed
+1
-1
@@ -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