mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +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
|
from .models import JellyfinData
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True, kw_only=True)
|
||||||
class JellyfinSensorEntityDescriptionMixin:
|
class JellyfinSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
"""Describes Jellyfin sensor entity."""
|
||||||
|
|
||||||
value_fn: Callable[[JellyfinDataT], StateType]
|
value_fn: Callable[[JellyfinDataT], StateType]
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
|
||||||
class JellyfinSensorEntityDescription(
|
|
||||||
SensorEntityDescription, JellyfinSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Describes Jellyfin sensor entity."""
|
|
||||||
|
|
||||||
|
|
||||||
def _count_now_playing(data: JellyfinDataT) -> int:
|
def _count_now_playing(data: JellyfinDataT) -> int:
|
||||||
"""Count the number of now playing."""
|
"""Count the number of now playing."""
|
||||||
session_ids = [
|
session_ids = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user