Use new SensorDeviceClass enum in eddystone_temperature (#61376)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
@@ -10,10 +10,13 @@ import logging
|
||||
from beacontools import BeaconScanner, EddystoneFilter, EddystoneTLMFrame
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.components.sensor import (
|
||||
PLATFORM_SCHEMA,
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
CONF_NAME,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
EVENT_HOMEASSISTANT_START,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
STATE_UNKNOWN,
|
||||
@@ -121,7 +124,7 @@ class EddystoneTemp(SensorEntity):
|
||||
@property
|
||||
def device_class(self):
|
||||
"""Return the class of this device, from component DEVICE_CLASSES."""
|
||||
return DEVICE_CLASS_TEMPERATURE
|
||||
return SensorDeviceClass.TEMPERATURE
|
||||
|
||||
@property
|
||||
def native_unit_of_measurement(self):
|
||||
|
||||
Reference in New Issue
Block a user