From 2db1013620c0ef756e66652b738cacc7149ce0e1 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 9 Dec 2021 15:38:32 +0100 Subject: [PATCH] Use new DeviceClass enums in blebox (#61361) Co-authored-by: epenet --- homeassistant/components/blebox/const.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/blebox/const.py b/homeassistant/components/blebox/const.py index f5eba403c75..401aa0a8771 100644 --- a/homeassistant/components/blebox/const.py +++ b/homeassistant/components/blebox/const.py @@ -1,16 +1,15 @@ """Constants for the BleBox devices integration.""" from homeassistant.components.cover import ( - DEVICE_CLASS_DOOR, - DEVICE_CLASS_GATE, - DEVICE_CLASS_SHUTTER, STATE_CLOSED, STATE_CLOSING, STATE_OPEN, STATE_OPENING, + CoverDeviceClass, ) -from homeassistant.components.switch import DEVICE_CLASS_SWITCH -from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS +from homeassistant.components.sensor import SensorDeviceClass +from homeassistant.components.switch import SwitchDeviceClass +from homeassistant.const import TEMP_CELSIUS DOMAIN = "blebox" PRODUCT = "product" @@ -24,11 +23,11 @@ UNSUPPORTED_VERSION = "unsupported_version" UNKNOWN = "unknown" BLEBOX_TO_HASS_DEVICE_CLASSES = { - "shutter": DEVICE_CLASS_SHUTTER, - "gatebox": DEVICE_CLASS_DOOR, - "gate": DEVICE_CLASS_GATE, - "relay": DEVICE_CLASS_SWITCH, - "temperature": DEVICE_CLASS_TEMPERATURE, + "shutter": CoverDeviceClass.SHUTTER, + "gatebox": CoverDeviceClass.DOOR, + "gate": CoverDeviceClass.GATE, + "relay": SwitchDeviceClass.SWITCH, + "temperature": SensorDeviceClass.TEMPERATURE, } BLEBOX_TO_HASS_COVER_STATES = {