From a6a388721fe1ad86dd8aeee43e9793c32d94ab79 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Mon, 13 Dec 2021 15:04:45 +0100 Subject: [PATCH] Use SwitchDeviceClass in gree (#61656) Co-authored-by: epenet --- homeassistant/components/gree/switch.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/gree/switch.py b/homeassistant/components/gree/switch.py index f8a5b4c0b3d..f05f751b8b6 100644 --- a/homeassistant/components/gree/switch.py +++ b/homeassistant/components/gree/switch.py @@ -1,7 +1,7 @@ """Support for interface with a Gree climate systems.""" from __future__ import annotations -from homeassistant.components.switch import DEVICE_CLASS_SWITCH, SwitchEntity +from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect @@ -47,7 +47,7 @@ class GreePanelLightSwitchEntity(GreeEntity, SwitchEntity): @property def device_class(self): """Return the class of this device, from component DEVICE_CLASSES.""" - return DEVICE_CLASS_SWITCH + return SwitchDeviceClass.SWITCH @property def is_on(self) -> bool: @@ -77,7 +77,7 @@ class GreeQuietModeSwitchEntity(GreeEntity, SwitchEntity): @property def device_class(self): """Return the class of this device, from component DEVICE_CLASSES.""" - return DEVICE_CLASS_SWITCH + return SwitchDeviceClass.SWITCH @property def is_on(self) -> bool: @@ -107,7 +107,7 @@ class GreeFreshAirSwitchEntity(GreeEntity, SwitchEntity): @property def device_class(self): """Return the class of this device, from component DEVICE_CLASSES.""" - return DEVICE_CLASS_SWITCH + return SwitchDeviceClass.SWITCH @property def is_on(self) -> bool: @@ -137,7 +137,7 @@ class GreeXFanSwitchEntity(GreeEntity, SwitchEntity): @property def device_class(self): """Return the class of this device, from component DEVICE_CLASSES.""" - return DEVICE_CLASS_SWITCH + return SwitchDeviceClass.SWITCH @property def is_on(self) -> bool: