mirror of
https://github.com/home-assistant/core.git
synced 2025-08-26 07:51:32 +02:00
use enums in skybeacon (#62052)
This commit is contained in:
@@ -8,11 +8,14 @@ from pygatt.backends import Characteristic, GATTToolBackend
|
||||
from pygatt.exceptions import BLEError, NotConnectedError, NotificationTimeout
|
||||
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_MAC,
|
||||
CONF_NAME,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
PERCENTAGE,
|
||||
STATE_UNKNOWN,
|
||||
@@ -91,7 +94,7 @@ class SkybeaconHumid(SensorEntity):
|
||||
class SkybeaconTemp(SensorEntity):
|
||||
"""Representation of a Skybeacon temperature sensor."""
|
||||
|
||||
_attr_device_class = DEVICE_CLASS_TEMPERATURE
|
||||
_attr_device_class = SensorDeviceClass.TEMPERATURE
|
||||
_attr_native_unit_of_measurement = TEMP_CELSIUS
|
||||
|
||||
def __init__(self, name, mon):
|
||||
|
Reference in New Issue
Block a user