Migrate binary sensor device classes to StrEnum (#60651)
This commit is contained in:
parent
12ff5dee74
commit
2b8f245e27
5 changed files with 135 additions and 102 deletions
|
@ -2,7 +2,11 @@
|
|||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity
|
||||
from homeassistant.components.binary_sensor import (
|
||||
PLATFORM_SCHEMA,
|
||||
BinarySensorDeviceClass,
|
||||
BinarySensorEntity,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import CONF_USERNAME
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -29,3 +33,5 @@ async def async_setup_entry(
|
|||
|
||||
class UpCloudBinarySensor(UpCloudServerEntity, BinarySensorEntity):
|
||||
"""Representation of an UpCloud server sensor."""
|
||||
|
||||
_attr_device_class = BinarySensorDeviceClass.POWER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue