mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 11:47:06 +00:00
Use device class enum in Supervisor (#60687)
This commit is contained in:
parent
52112a25b0
commit
49f3a7ce46
@ -4,8 +4,7 @@ from __future__ import annotations
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import (
|
||||||
DEVICE_CLASS_RUNNING,
|
BinarySensorDeviceClass,
|
||||||
DEVICE_CLASS_UPDATE,
|
|
||||||
BinarySensorEntity,
|
BinarySensorEntity,
|
||||||
BinarySensorEntityDescription,
|
BinarySensorEntityDescription,
|
||||||
)
|
)
|
||||||
@ -33,7 +32,7 @@ class HassioBinarySensorEntityDescription(BinarySensorEntityDescription):
|
|||||||
|
|
||||||
COMMON_ENTITY_DESCRIPTIONS = (
|
COMMON_ENTITY_DESCRIPTIONS = (
|
||||||
HassioBinarySensorEntityDescription(
|
HassioBinarySensorEntityDescription(
|
||||||
device_class=DEVICE_CLASS_UPDATE,
|
device_class=BinarySensorDeviceClass.UPDATE,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
key=ATTR_UPDATE_AVAILABLE,
|
key=ATTR_UPDATE_AVAILABLE,
|
||||||
name="Update Available",
|
name="Update Available",
|
||||||
@ -42,7 +41,7 @@ COMMON_ENTITY_DESCRIPTIONS = (
|
|||||||
|
|
||||||
ADDON_ENTITY_DESCRIPTIONS = COMMON_ENTITY_DESCRIPTIONS + (
|
ADDON_ENTITY_DESCRIPTIONS = COMMON_ENTITY_DESCRIPTIONS + (
|
||||||
HassioBinarySensorEntityDescription(
|
HassioBinarySensorEntityDescription(
|
||||||
device_class=DEVICE_CLASS_RUNNING,
|
device_class=BinarySensorDeviceClass.RUNNING,
|
||||||
entity_registry_enabled_default=False,
|
entity_registry_enabled_default=False,
|
||||||
key=ATTR_STATE,
|
key=ATTR_STATE,
|
||||||
name="Running",
|
name="Running",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user