mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
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
@ -88,7 +88,12 @@ class TorqueReceiveDataView(HomeAssistantView):
|
|||||||
names[pid] = data[key]
|
names[pid] = data[key]
|
||||||
elif is_unit:
|
elif is_unit:
|
||||||
pid = convert_pid(is_unit.group(1))
|
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:
|
elif is_value:
|
||||||
pid = convert_pid(is_value.group(1))
|
pid = convert_pid(is_value.group(1))
|
||||||
if pid in self.sensors:
|
if pid in self.sensors:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user