diff --git a/homeassistant/components/rpi_power/binary_sensor.py b/homeassistant/components/rpi_power/binary_sensor.py index f223bbf2c91..f70581a8075 100644 --- a/homeassistant/components/rpi_power/binary_sensor.py +++ b/homeassistant/components/rpi_power/binary_sensor.py @@ -8,7 +8,7 @@ import logging from rpi_bad_power import UnderVoltage, new_under_voltage from homeassistant.components.binary_sensor import ( - DEVICE_CLASS_PROBLEM, + BinarySensorDeviceClass, BinarySensorEntity, ) from homeassistant.config_entries import ConfigEntry @@ -34,7 +34,7 @@ async def async_setup_entry( class RaspberryChargerBinarySensor(BinarySensorEntity): """Binary sensor representing the rpi power status.""" - _attr_device_class = DEVICE_CLASS_PROBLEM + _attr_device_class = BinarySensorDeviceClass.PROBLEM _attr_icon = "mdi:raspberry-pi" _attr_name = "RPi Power status" _attr_unique_id = "rpi_power" # only one sensor possible