Use SensorDeviceClass in lacrosse (#61879)

Co-authored-by: epenet <epenet@users.noreply.github.com>
pull/61877/head
epenet 2021-12-15 14:48:19 +01:00 committed by GitHub
parent cc3a4fef53
commit ef15b159c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import voluptuous as vol
from homeassistant.components.sensor import (
ENTITY_ID_FORMAT,
PLATFORM_SCHEMA,
SensorDeviceClass,
SensorEntity,
)
from homeassistant.const import (
@ -17,7 +18,6 @@ from homeassistant.const import (
CONF_NAME,
CONF_SENSORS,
CONF_TYPE,
DEVICE_CLASS_TEMPERATURE,
EVENT_HOMEASSISTANT_STOP,
PERCENTAGE,
TEMP_CELSIUS,
@ -175,7 +175,7 @@ class LaCrosseSensor(SensorEntity):
class LaCrosseTemperature(LaCrosseSensor):
"""Implementation of a Lacrosse temperature sensor."""
_attr_device_class = DEVICE_CLASS_TEMPERATURE
_attr_device_class = SensorDeviceClass.TEMPERATURE
_attr_native_unit_of_measurement = TEMP_CELSIUS
@property