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

@ -1,6 +1,7 @@
"""This platform provides support for sensor data from RainMachine."""
import logging
from homeassistant.const import TEMP_CELSIUS
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
@ -57,7 +58,7 @@ SENSORS = {
TYPE_FREEZE_TEMP: (
"Freeze Protect Temperature",
"mdi:thermometer",
"°C",
TEMP_CELSIUS,
"temperature",
True,
DATA_RESTRICTIONS_UNIVERSAL,
@ -84,7 +85,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
sensor_type,
(name, icon, unit, device_class, enabled_by_default, api_category),
) in SENSORS.items()
],
]
)