Remove entity description mixin in Jellyfin (#112782)

This commit is contained in:
Joost Lekkerkerker 2024-03-09 11:00:23 +01:00 committed by GitHub
parent 8b2759d810
commit 3301117223
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,20 +17,13 @@ from .entity import JellyfinEntity
from .models import JellyfinData
@dataclass(frozen=True)
class JellyfinSensorEntityDescriptionMixin:
"""Mixin for required keys."""
@dataclass(frozen=True, kw_only=True)
class JellyfinSensorEntityDescription(SensorEntityDescription):
"""Describes Jellyfin sensor entity."""
value_fn: Callable[[JellyfinDataT], StateType]
@dataclass(frozen=True)
class JellyfinSensorEntityDescription(
SensorEntityDescription, JellyfinSensorEntityDescriptionMixin
):
"""Describes Jellyfin sensor entity."""
def _count_now_playing(data: JellyfinDataT) -> int:
"""Count the number of now playing."""
session_ids = [