Use TEMP_CELSIUS constant (#33963)

This commit is contained in:
springstan authored and GitHub committed 2020-04-10 19:17:46 +02:00
1 parent ca0648afe8
commit 78d87dc40f
24 files changed
+129 -96

No files matched your search

+3 -3
View File
@@ -208,7 +208,7 @@ class DysonTest(unittest.TestCase):
sensor.entity_id = "sensor.dyson_1"
assert not sensor.should_poll
assert sensor.state is None
assert sensor.unit_of_measurement == "°C"
assert sensor.unit_of_measurement == TEMP_CELSIUS
assert sensor.name == "Device_name Temperature"
assert sensor.entity_id == "sensor.dyson_1"
@@ -219,7 +219,7 @@ class DysonTest(unittest.TestCase):
sensor.entity_id = "sensor.dyson_1"
assert not sensor.should_poll
assert sensor.state == 21.9
assert sensor.unit_of_measurement == "°C"
assert sensor.unit_of_measurement == TEMP_CELSIUS
assert sensor.name == "Device_name Temperature"
assert sensor.entity_id == "sensor.dyson_1"
@@ -241,7 +241,7 @@ class DysonTest(unittest.TestCase):
sensor.entity_id = "sensor.dyson_1"
assert not sensor.should_poll
assert sensor.state == STATE_OFF
assert sensor.unit_of_measurement == "°C"
assert sensor.unit_of_measurement == TEMP_CELSIUS
assert sensor.name == "Device_name Temperature"
assert sensor.entity_id == "sensor.dyson_1"