Use enums in rpi_power (#62046)
This commit is contained in:
parent
12ae684c96
commit
1fb69fb69a
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue