diff --git a/homeassistant/components/flipr/binary_sensor.py b/homeassistant/components/flipr/binary_sensor.py index 400c1562088..54f90248802 100644 --- a/homeassistant/components/flipr/binary_sensor.py +++ b/homeassistant/components/flipr/binary_sensor.py @@ -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, ), ) diff --git a/homeassistant/components/flipr/sensor.py b/homeassistant/components/flipr/sensor.py index 527742539c5..9fcef425a26 100644 --- a/homeassistant/components/flipr/sensor.py +++ b/homeassistant/components/flipr/sensor.py @@ -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",