mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Use EntityFeature enum in switch_as_x (#69442)
This commit is contained in:
parent
a6f112df80
commit
f11f1db177
@ -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."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user