Use TEMP_CELSIUS constant (#33963)
This commit is contained in:
1 parent
ca0648afe8
commit
78d87dc40f
24 files changed
+129
-96
No files matched your search
@@ -221,7 +221,7 @@ class TestMinMaxSensor(unittest.TestCase):
|
||||
state = self.hass.states.get("sensor.test")
|
||||
|
||||
assert str(float(self.values[0])) == state.state
|
||||
assert state.attributes.get("unit_of_measurement") == "°C"
|
||||
assert state.attributes.get("unit_of_measurement") == TEMP_CELSIUS
|
||||
|
||||
self.hass.states.set(
|
||||
entity_ids[1], self.values[1], {ATTR_UNIT_OF_MEASUREMENT: TEMP_FAHRENHEIT}
|
||||
|
||||
Reference in new issue
Block a user