mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Mark RPI Power binary sensor as diagnostic (#76198)
This commit is contained in:
parent
aa3097a3be
commit
726eb82758
@ -13,6 +13,7 @@ from homeassistant.components.binary_sensor import (
|
|||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
@ -35,6 +36,7 @@ class RaspberryChargerBinarySensor(BinarySensorEntity):
|
|||||||
"""Binary sensor representing the rpi power status."""
|
"""Binary sensor representing the rpi power status."""
|
||||||
|
|
||||||
_attr_device_class = BinarySensorDeviceClass.PROBLEM
|
_attr_device_class = BinarySensorDeviceClass.PROBLEM
|
||||||
|
_attr_entity_category = EntityCategory.DIAGNOSTIC
|
||||||
_attr_icon = "mdi:raspberry-pi"
|
_attr_icon = "mdi:raspberry-pi"
|
||||||
_attr_name = "RPi Power status"
|
_attr_name = "RPi Power status"
|
||||||
_attr_unique_id = "rpi_power" # only one sensor possible
|
_attr_unique_id = "rpi_power" # only one sensor possible
|
||||||
|
Loading…
x
Reference in New Issue
Block a user