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
@@ -15,6 +15,7 @@ from homeassistant.const import (
|
||||
DEVICE_CLASS_BATTERY,
|
||||
DEVICE_CLASS_HUMIDITY,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
TEMP_CELSIUS,
|
||||
UNIT_PERCENTAGE,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@@ -46,7 +47,7 @@ DEFAULT_TIMEOUT = 10
|
||||
|
||||
# Sensor types are defined like: Name, units
|
||||
SENSOR_TYPES = {
|
||||
"temperature": [DEVICE_CLASS_TEMPERATURE, "Temperature", "°C"],
|
||||
"temperature": [DEVICE_CLASS_TEMPERATURE, "Temperature", TEMP_CELSIUS],
|
||||
"humidity": [DEVICE_CLASS_HUMIDITY, "Humidity", UNIT_PERCENTAGE],
|
||||
"battery": [DEVICE_CLASS_BATTERY, "Battery", UNIT_PERCENTAGE],
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user