mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Use new SensorDeviceClass enum in foobot (#61442)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
5538d5d59d
commit
172237f4f1
@ -9,7 +9,11 @@ import aiohttp
|
||||
from foobot_async import FoobotClient
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
|
||||
from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.const import (
|
||||
ATTR_TEMPERATURE,
|
||||
ATTR_TIME,
|
||||
@ -18,7 +22,6 @@ from homeassistant.const import (
|
||||
CONCENTRATION_PARTS_PER_MILLION,
|
||||
CONF_TOKEN,
|
||||
CONF_USERNAME,
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
PERCENTAGE,
|
||||
TEMP_CELSIUS,
|
||||
TIME_SECONDS,
|
||||
@ -54,7 +57,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
key="tmp",
|
||||
name=ATTR_TEMPERATURE,
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="hum",
|
||||
|
Loading…
x
Reference in New Issue
Block a user