mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Remove entity description mixin in Jellyfin (#112782)
This commit is contained in:
parent
8b2759d810
commit
3301117223
@ -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 = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user