diff --git a/homeassistant/components/ring/binary_sensor.py b/homeassistant/components/ring/binary_sensor.py index de854022301..12534dfd01f 100644 --- a/homeassistant/components/ring/binary_sensor.py +++ b/homeassistant/components/ring/binary_sensor.py @@ -5,8 +5,7 @@ from dataclasses import dataclass from datetime import datetime from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_MOTION, - DEVICE_CLASS_OCCUPANCY, + BinarySensorDeviceClass, BinarySensorEntity, BinarySensorEntityDescription, ) @@ -35,13 +34,13 @@ BINARY_SENSOR_TYPES: tuple[RingBinarySensorEntityDescription, ...] = ( key="ding", name="Ding", category=["doorbots", "authorized_doorbots"], - device_class=DEVICE_CLASS_OCCUPANCY, + device_class=BinarySensorDeviceClass.OCCUPANCY, ), RingBinarySensorEntityDescription( key="motion", name="Motion", category=["doorbots", "authorized_doorbots", "stickup_cams"], - device_class=DEVICE_CLASS_MOTION, + device_class=BinarySensorDeviceClass.MOTION, ), ) diff --git a/homeassistant/components/ring/sensor.py b/homeassistant/components/ring/sensor.py index 2745c69d50a..d4ac5bafc2d 100644 --- a/homeassistant/components/ring/sensor.py +++ b/homeassistant/components/ring/sensor.py @@ -3,12 +3,12 @@ from __future__ import annotations from dataclasses import dataclass -from homeassistant.components.sensor import SensorEntity, SensorEntityDescription -from homeassistant.const import ( - DEVICE_CLASS_TIMESTAMP, - PERCENTAGE, - SIGNAL_STRENGTH_DECIBELS_MILLIWATT, +from homeassistant.components.sensor import ( + SensorDeviceClass, + SensorEntity, + SensorEntityDescription, ) +from homeassistant.const import PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT from homeassistant.core import callback from homeassistant.helpers.icon import icon_for_battery_level @@ -209,7 +209,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = ( name="Last Activity", category=["doorbots", "authorized_doorbots", "stickup_cams"], icon="mdi:history", - device_class=DEVICE_CLASS_TIMESTAMP, + device_class=SensorDeviceClass.TIMESTAMP, cls=HistoryRingSensor, ), RingSensorEntityDescription( @@ -218,7 +218,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = ( category=["doorbots", "authorized_doorbots"], icon="mdi:history", kind="ding", - device_class=DEVICE_CLASS_TIMESTAMP, + device_class=SensorDeviceClass.TIMESTAMP, cls=HistoryRingSensor, ), RingSensorEntityDescription( @@ -227,7 +227,7 @@ SENSOR_TYPES: tuple[RingSensorEntityDescription, ...] = ( category=["doorbots", "authorized_doorbots", "stickup_cams"], icon="mdi:history", kind="motion", - device_class=DEVICE_CLASS_TIMESTAMP, + device_class=SensorDeviceClass.TIMESTAMP, cls=HistoryRingSensor, ), RingSensorEntityDescription(