diff --git a/homeassistant/components/poolsense/binary_sensor.py b/homeassistant/components/poolsense/binary_sensor.py index 1b45ee15f0f..2f48539adb3 100644 --- a/homeassistant/components/poolsense/binary_sensor.py +++ b/homeassistant/components/poolsense/binary_sensor.py @@ -2,7 +2,7 @@ from __future__ import annotations from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_PROBLEM, + BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription, ) @@ -15,12 +15,12 @@ BINARY_SENSOR_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/poolsense/sensor.py b/homeassistant/components/poolsense/sensor.py index 82df8b4d208..d4ac0d0f292 100644 --- a/homeassistant/components/poolsense/sensor.py +++ b/homeassistant/components/poolsense/sensor.py @@ -1,12 +1,13 @@ """Sensor platform for the PoolSense sensor.""" from __future__ import annotations -from homeassistant.components.sensor import SensorEntity, SensorEntityDescription +from homeassistant.components.sensor import ( + SensorDeviceClass, + SensorEntity, + SensorEntityDescription, +) from homeassistant.const import ( CONF_EMAIL, - DEVICE_CLASS_BATTERY, - DEVICE_CLASS_TEMPERATURE, - DEVICE_CLASS_TIMESTAMP, ELECTRIC_POTENTIAL_MILLIVOLT, PERCENTAGE, TEMP_CELSIUS, @@ -31,20 +32,20 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( key="Battery", native_unit_of_measurement=PERCENTAGE, name="Battery", - device_class=DEVICE_CLASS_BATTERY, + device_class=SensorDeviceClass.BATTERY, ), SensorEntityDescription( key="Water Temp", native_unit_of_measurement=TEMP_CELSIUS, icon="mdi:coolant-temperature", name="Temperature", - device_class=DEVICE_CLASS_TEMPERATURE, + device_class=SensorDeviceClass.TEMPERATURE, ), SensorEntityDescription( key="Last Seen", icon="mdi:clock", name="Last Seen", - device_class=DEVICE_CLASS_TIMESTAMP, + device_class=SensorDeviceClass.TIMESTAMP, ), SensorEntityDescription( key="Chlorine High",