mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Remove entity description mixin in idasen desk (#112780)
This commit is contained in:
parent
6f03c305d4
commit
24b7f03e31
@ -18,22 +18,15 @@ from .const import DOMAIN
|
|||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class IdasenDeskButtonDescriptionMixin:
|
class IdasenDeskButtonDescription(ButtonEntityDescription):
|
||||||
"""Mixin to describe a IdasenDesk button entity."""
|
"""Class to describe a IdasenDesk button entity."""
|
||||||
|
|
||||||
press_action: Callable[
|
press_action: Callable[
|
||||||
[IdasenDeskCoordinator], Callable[[], Coroutine[Any, Any, Any]]
|
[IdasenDeskCoordinator], Callable[[], Coroutine[Any, Any, Any]]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class IdasenDeskButtonDescription(
|
|
||||||
ButtonEntityDescription, IdasenDeskButtonDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Class to describe a IdasenDesk button entity."""
|
|
||||||
|
|
||||||
|
|
||||||
BUTTONS: Final = [
|
BUTTONS: Final = [
|
||||||
IdasenDeskButtonDescription(
|
IdasenDeskButtonDescription(
|
||||||
key="connect",
|
key="connect",
|
||||||
|
@ -23,21 +23,13 @@ from . import DeskData, IdasenDeskCoordinator
|
|||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class IdasenDeskSensorDescriptionMixin:
|
class IdasenDeskSensorDescription(SensorEntityDescription):
|
||||||
"""Required values for IdasenDesk sensors."""
|
"""Class describing IdasenDesk sensor entities."""
|
||||||
|
|
||||||
value_fn: Callable[[IdasenDeskCoordinator], float | None]
|
value_fn: Callable[[IdasenDeskCoordinator], float | None]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class IdasenDeskSensorDescription(
|
|
||||||
SensorEntityDescription,
|
|
||||||
IdasenDeskSensorDescriptionMixin,
|
|
||||||
):
|
|
||||||
"""Class describing IdasenDesk sensor entities."""
|
|
||||||
|
|
||||||
|
|
||||||
SENSORS = (
|
SENSORS = (
|
||||||
IdasenDeskSensorDescription(
|
IdasenDeskSensorDescription(
|
||||||
key="height",
|
key="height",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user