Remove entity description mixin in Launch Library (#112902)

This commit is contained in:
Joost Lekkerkerker 2024-03-11 11:28:08 +01:00 committed by GitHub
parent d95f30611e
commit d9996d3add
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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",