mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove entity description mixin in QNAP QSW (#112924)
This commit is contained in:
parent
c60aed3012
commit
53613e69f2
@ -23,18 +23,13 @@ from .coordinator import QswDataCoordinator
|
|||||||
from .entity import QswDataEntity
|
from .entity import QswDataEntity
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class QswButtonDescriptionMixin:
|
class QswButtonDescription(ButtonEntityDescription):
|
||||||
"""Mixin to describe a Button entity."""
|
"""Class to describe a Button entity."""
|
||||||
|
|
||||||
press_action: Callable[[QnapQswApi], Awaitable[bool]]
|
press_action: Callable[[QnapQswApi], Awaitable[bool]]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class QswButtonDescription(ButtonEntityDescription, QswButtonDescriptionMixin):
|
|
||||||
"""Class to describe a Button entity."""
|
|
||||||
|
|
||||||
|
|
||||||
BUTTON_TYPES: Final[tuple[QswButtonDescription, ...]] = (
|
BUTTON_TYPES: Final[tuple[QswButtonDescription, ...]] = (
|
||||||
QswButtonDescription(
|
QswButtonDescription(
|
||||||
device_class=ButtonDeviceClass.RESTART,
|
device_class=ButtonDeviceClass.RESTART,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user