handle degrees correctly

This commit is contained in:
2022-10-26 22:49:26 +02:00
parent e0d425acee
commit cec93baa8f
+5 -1
View File
@@ -65,7 +65,11 @@ class Adjustable(BaseAdjustable, TaskProducer, SpecConvenience, NumericConvenien
def _printable_value(self):
value = self.get_current_value()
units = self.units
return f"{value} {units}" if units is not None else str(value)
if units is None:
return str(value)
if units.casefold() in ["deg", "°"]:
return f"{value}°"
return f"{value} {units}"