diff --git a/homeassistant/components/shelly/cover.py b/homeassistant/components/shelly/cover.py index 78aa7606aac..f9bd1b7ce85 100644 --- a/homeassistant/components/shelly/cover.py +++ b/homeassistant/components/shelly/cover.py @@ -47,9 +47,9 @@ class ShellyCover(ShellyBlockEntity, CoverEntity): """Initialize light.""" super().__init__(wrapper, block) self.control_result: dict[str, Any] | None = None - self._supported_features: int = SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_STOP + self._attr_supported_features: int = SUPPORT_OPEN | SUPPORT_CLOSE | SUPPORT_STOP if self.wrapper.device.settings["rollers"][0]["positioning"]: - self._supported_features |= SUPPORT_SET_POSITION + self._attr_supported_features |= SUPPORT_SET_POSITION @property def is_closed(self) -> bool: @@ -83,11 +83,6 @@ class ShellyCover(ShellyBlockEntity, CoverEntity): return self.block.roller == "open" - @property - def supported_features(self) -> int: - """Flag supported features.""" - return self._supported_features - async def async_close_cover(self, **kwargs: Any) -> None: """Close cover.""" self.control_result = await self.set_state(go="close")