Use enums in xbee (#61982)
parent
b8dabfe659
commit
a41810efcf
|
@ -5,8 +5,8 @@ import logging
|
|||
import voluptuous as vol
|
||||
from xbee_helper.exceptions import ZigBeeException, ZigBeeTxFailure
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity
|
||||
from homeassistant.const import CONF_TYPE, DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||
from homeassistant.const import CONF_TYPE, TEMP_CELSIUS
|
||||
|
||||
from . import DOMAIN, PLATFORM_SCHEMA, XBeeAnalogIn, XBeeAnalogInConfig, XBeeConfig
|
||||
|
||||
|
@ -46,7 +46,7 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
class XBeeTemperatureSensor(SensorEntity):
|
||||
"""Representation of XBee Pro temperature sensor."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_TEMPERATURE
|
||||
_attr_device_class = SensorDeviceClass.TEMPERATURE
|
||||
_attr_native_unit_of_measurement = TEMP_CELSIUS
|
||||
|
||||
def __init__(self, config, device):
|
||||
|
|
Loading…
Reference in New Issue