Use device class enum in Supervisor (#60687)

pull/60706/head
Joakim Sørensen 2021-12-01 10:55:30 +01:00 committed by GitHub
parent 52112a25b0
commit 49f3a7ce46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -4,8 +4,7 @@ from __future__ import annotations
from dataclasses import dataclass
from homeassistant.components.binary_sensor import (
DEVICE_CLASS_RUNNING,
DEVICE_CLASS_UPDATE,
BinarySensorDeviceClass,
BinarySensorEntity,
BinarySensorEntityDescription,
)
@ -33,7 +32,7 @@ class HassioBinarySensorEntityDescription(BinarySensorEntityDescription):
COMMON_ENTITY_DESCRIPTIONS = (
HassioBinarySensorEntityDescription(
device_class=DEVICE_CLASS_UPDATE,
device_class=BinarySensorDeviceClass.UPDATE,
entity_registry_enabled_default=False,
key=ATTR_UPDATE_AVAILABLE,
name="Update Available",
@ -42,7 +41,7 @@ COMMON_ENTITY_DESCRIPTIONS = (
ADDON_ENTITY_DESCRIPTIONS = COMMON_ENTITY_DESCRIPTIONS + (
HassioBinarySensorEntityDescription(
device_class=DEVICE_CLASS_RUNNING,
device_class=BinarySensorDeviceClass.RUNNING,
entity_registry_enabled_default=False,
key=ATTR_STATE,
name="Running",