Remove entity description mixin in QNAP QSW (#112924)
This commit is contained in:
parent
c60aed3012
commit
53613e69f2
1 changed files with 3 additions and 8 deletions
|
@ -23,18 +23,13 @@ from .coordinator import QswDataCoordinator
|
|||
from .entity import QswDataEntity
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class QswButtonDescriptionMixin:
|
||||
"""Mixin to describe a Button entity."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class QswButtonDescription(ButtonEntityDescription):
|
||||
"""Class to describe a Button entity."""
|
||||
|
||||
press_action: Callable[[QnapQswApi], Awaitable[bool]]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class QswButtonDescription(ButtonEntityDescription, QswButtonDescriptionMixin):
|
||||
"""Class to describe a Button entity."""
|
||||
|
||||
|
||||
BUTTON_TYPES: Final[tuple[QswButtonDescription, ...]] = (
|
||||
QswButtonDescription(
|
||||
device_class=ButtonDeviceClass.RESTART,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue