From 49f3a7ce462f5a67b3c9393db0ef67661da5042b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 1 Dec 2021 10:55:30 +0100 Subject: [PATCH] Use device class enum in Supervisor (#60687) --- homeassistant/components/hassio/binary_sensor.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/hassio/binary_sensor.py b/homeassistant/components/hassio/binary_sensor.py index b30c2d1c7f5..b5525fe9ce4 100644 --- a/homeassistant/components/hassio/binary_sensor.py +++ b/homeassistant/components/hassio/binary_sensor.py @@ -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",