mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove entity description mixin in Launch Library (#112902)
This commit is contained in:
parent
d95f30611e
commit
d9996d3add
@ -32,21 +32,14 @@ from .const import DOMAIN
|
||||
DEFAULT_NEXT_LAUNCH_NAME = "Next launch"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LaunchLibrarySensorEntityDescriptionMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class LaunchLibrarySensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes a Next Launch sensor entity."""
|
||||
|
||||
value_fn: Callable[[Launch | Event], datetime | int | str | None]
|
||||
attributes_fn: Callable[[Launch | Event], dict[str, Any] | None]
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class LaunchLibrarySensorEntityDescription(
|
||||
SensorEntityDescription, LaunchLibrarySensorEntityDescriptionMixin
|
||||
):
|
||||
"""Describes a Next Launch sensor entity."""
|
||||
|
||||
|
||||
SENSOR_DESCRIPTIONS: tuple[LaunchLibrarySensorEntityDescription, ...] = (
|
||||
LaunchLibrarySensorEntityDescription(
|
||||
key="next_launch",
|
||||
|
Loading…
x
Reference in New Issue
Block a user