Use TEMP_CELSIUS constant (#33963)

This commit is contained in:
springstan 2020-04-10 19:17:46 +02:00 committed by GitHub
parent ca0648afe8
commit 78d87dc40f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 129 additions and 96 deletions

View file

@ -7,7 +7,12 @@ from aionotion.errors import InvalidCredentialsError, NotionError
import voluptuous as vol
from homeassistant.config_entries import SOURCE_IMPORT
from homeassistant.const import ATTR_ATTRIBUTION, CONF_PASSWORD, CONF_USERNAME
from homeassistant.const import (
ATTR_ATTRIBUTION,
CONF_PASSWORD,
CONF_USERNAME,
TEMP_CELSIUS,
)
from homeassistant.core import callback
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers import (
@ -57,7 +62,7 @@ BINARY_SENSOR_TYPES = {
SENSOR_WINDOW_HINGED_HORIZONTAL: ("Hinged Window", "window"),
SENSOR_WINDOW_HINGED_VERTICAL: ("Hinged Window", "window"),
}
SENSOR_TYPES = {SENSOR_TEMPERATURE: ("Temperature", "temperature", "°C")}
SENSOR_TYPES = {SENSOR_TEMPERATURE: ("Temperature", "temperature", TEMP_CELSIUS)}
CONFIG_SCHEMA = vol.Schema(
{