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

@@ -1,7 +1,7 @@
"""Support for Eight Sleep sensors."""
import logging
from homeassistant.const import UNIT_PERCENTAGE
from homeassistant.const import TEMP_CELSIUS, UNIT_PERCENTAGE
from . import (
CONF_SENSORS,
@@ -166,7 +166,7 @@ class EightUserSensor(EightSleepUserEntity):
return "Score"
if "bed_temp" in self._sensor:
if self._units == "si":
return "°C"
return TEMP_CELSIUS
return "°F"
return None
@@ -329,7 +329,7 @@ class EightRoomSensor(EightSleepUserEntity):
def unit_of_measurement(self):
"""Return the unit the value is expressed in."""
if self._units == "si":
return "°C"
return TEMP_CELSIUS
return "°F"
@property