diff --git a/homeassistant/components/blink/binary_sensor.py b/homeassistant/components/blink/binary_sensor.py index 6be284e2197..6e5dd58c368 100644 --- a/homeassistant/components/blink/binary_sensor.py +++ b/homeassistant/components/blink/binary_sensor.py @@ -2,8 +2,7 @@ from __future__ import annotations from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_BATTERY, - DEVICE_CLASS_MOTION, + BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription, ) @@ -14,7 +13,7 @@ BINARY_SENSORS_TYPES: tuple[BinarySensorEntityDescription, ...] = ( BinarySensorEntityDescription( key=TYPE_BATTERY, name="Battery", - device_class=DEVICE_CLASS_BATTERY, + device_class=BinarySensorDeviceClass.BATTERY, ), BinarySensorEntityDescription( key=TYPE_CAMERA_ARMED, @@ -23,7 +22,7 @@ BINARY_SENSORS_TYPES: tuple[BinarySensorEntityDescription, ...] = ( BinarySensorEntityDescription( key=TYPE_MOTION_DETECTED, name="Motion Detected", - device_class=DEVICE_CLASS_MOTION, + device_class=BinarySensorDeviceClass.MOTION, ), ) diff --git a/homeassistant/components/blink/sensor.py b/homeassistant/components/blink/sensor.py index d2122b59cd8..8a5947ec8bf 100644 --- a/homeassistant/components/blink/sensor.py +++ b/homeassistant/components/blink/sensor.py @@ -3,13 +3,12 @@ from __future__ import annotations import logging -from homeassistant.components.sensor import SensorEntity, SensorEntityDescription -from homeassistant.const import ( - DEVICE_CLASS_SIGNAL_STRENGTH, - DEVICE_CLASS_TEMPERATURE, - SIGNAL_STRENGTH_DECIBELS_MILLIWATT, - TEMP_FAHRENHEIT, +from homeassistant.components.sensor import ( + SensorDeviceClass, + SensorEntity, + SensorEntityDescription, ) +from homeassistant.const import SIGNAL_STRENGTH_DECIBELS_MILLIWATT, TEMP_FAHRENHEIT from .const import DOMAIN, TYPE_TEMPERATURE, TYPE_WIFI_STRENGTH @@ -20,13 +19,13 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = ( key=TYPE_TEMPERATURE, name="Temperature", native_unit_of_measurement=TEMP_FAHRENHEIT, - device_class=DEVICE_CLASS_TEMPERATURE, + device_class=SensorDeviceClass.TEMPERATURE, ), SensorEntityDescription( key=TYPE_WIFI_STRENGTH, name="Wifi Signal", native_unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT, - device_class=DEVICE_CLASS_SIGNAL_STRENGTH, + device_class=SensorDeviceClass.SIGNAL_STRENGTH, ), )