mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Use new DeviceClass enums in flipr (#61439)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
da7c5f4722
commit
5538d5d59d
@ -2,7 +2,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
DEVICE_CLASS_PROBLEM,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
BinarySensorEntityDescription,
|
||||
)
|
||||
@ -14,12 +14,12 @@ BINARY_SENSORS_TYPES: tuple[BinarySensorEntityDescription, ...] = (
|
||||
BinarySensorEntityDescription(
|
||||
key="ph_status",
|
||||
name="PH Status",
|
||||
device_class=DEVICE_CLASS_PROBLEM,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
),
|
||||
BinarySensorEntityDescription(
|
||||
key="chlorine_status",
|
||||
name="Chlorine Status",
|
||||
device_class=DEVICE_CLASS_PROBLEM,
|
||||
device_class=BinarySensorDeviceClass.PROBLEM,
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
"""Sensor platform for the Flipr's pool_sensor."""
|
||||
from __future__ import annotations
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity, SensorEntityDescription
|
||||
from homeassistant.const import (
|
||||
DEVICE_CLASS_TEMPERATURE,
|
||||
DEVICE_CLASS_TIMESTAMP,
|
||||
ELECTRIC_POTENTIAL_MILLIVOLT,
|
||||
TEMP_CELSIUS,
|
||||
from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
SensorEntity,
|
||||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.const import ELECTRIC_POTENTIAL_MILLIVOLT, TEMP_CELSIUS
|
||||
|
||||
from . import FliprEntity
|
||||
from .const import DOMAIN
|
||||
@ -27,13 +26,13 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
||||
SensorEntityDescription(
|
||||
key="temperature",
|
||||
name="Water Temp",
|
||||
device_class=DEVICE_CLASS_TEMPERATURE,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
native_unit_of_measurement=TEMP_CELSIUS,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="date_time",
|
||||
name="Last Measured",
|
||||
device_class=DEVICE_CLASS_TIMESTAMP,
|
||||
device_class=SensorDeviceClass.TIMESTAMP,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
key="red_ox",
|
||||
|
Loading…
x
Reference in New Issue
Block a user