From f11f1db177bd71a7a29c49ad507f922479329b85 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Thu, 7 Apr 2022 07:14:10 +0200 Subject: [PATCH] Use EntityFeature enum in switch_as_x (#69442) --- homeassistant/components/switch_as_x/cover.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/switch_as_x/cover.py b/homeassistant/components/switch_as_x/cover.py index 3825953ed63..4aea836517d 100644 --- a/homeassistant/components/switch_as_x/cover.py +++ b/homeassistant/components/switch_as_x/cover.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Any -from homeassistant.components.cover import SUPPORT_CLOSE, SUPPORT_OPEN, CoverEntity +from homeassistant.components.cover import CoverEntity, CoverEntityFeature from homeassistant.components.switch.const import DOMAIN as SWITCH_DOMAIN from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( @@ -48,7 +48,7 @@ async def async_setup_entry( class CoverSwitch(BaseEntity, CoverEntity): """Represents a Switch as a Cover.""" - _attr_supported_features = SUPPORT_OPEN | SUPPORT_CLOSE + _attr_supported_features = CoverEntityFeature.OPEN | CoverEntityFeature.CLOSE async def async_open_cover(self, **kwargs: Any) -> None: """Open the cover."""