Fix torque degree char (#26183)
* Fix for \xC2\xB0 char instead of degree symbol * Remove comment * Black
This commit is contained in:
parent
886d8bd6e2
commit
873d331ee3
1 changed files with 6 additions and 1 deletions
|
@ -88,7 +88,12 @@ class TorqueReceiveDataView(HomeAssistantView):
|
|||
names[pid] = data[key]
|
||||
elif is_unit:
|
||||
pid = convert_pid(is_unit.group(1))
|
||||
units[pid] = data[key]
|
||||
|
||||
temp_unit = data[key]
|
||||
if "\\xC2\\xB0" in temp_unit:
|
||||
temp_unit = temp_unit.replace("\\xC2\\xB0", "°")
|
||||
|
||||
units[pid] = temp_unit
|
||||
elif is_value:
|
||||
pid = convert_pid(is_value.group(1))
|
||||
if pid in self.sensors:
|
||||
|
|
Loading…
Add table
Reference in a new issue