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."""