mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Use enums in rpi_power (#62046)
This commit is contained in:
parent
12ae684c96
commit
1fb69fb69a
@ -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…
x
Reference in New Issue
Block a user