Remove entity description mixin in Youtube (#112975)

This commit is contained in:
Joost Lekkerkerker
2024-03-10 19:48:14 +01:00
committed by GitHub
parent 65624a9491
commit 5bfbe00c57

View File

@@ -27,9 +27,9 @@ from .const import (
from .entity import YouTubeChannelEntity from .entity import YouTubeChannelEntity
@dataclass(frozen=True) @dataclass(frozen=True, kw_only=True)
class YouTubeMixin: class YouTubeSensorEntityDescription(SensorEntityDescription):
"""Mixin for required keys.""" """Describes YouTube sensor entity."""
available_fn: Callable[[Any], bool] available_fn: Callable[[Any], bool]
value_fn: Callable[[Any], StateType] value_fn: Callable[[Any], StateType]
@@ -37,11 +37,6 @@ class YouTubeMixin:
attributes_fn: Callable[[Any], dict[str, Any] | None] | None attributes_fn: Callable[[Any], dict[str, Any] | None] | None
@dataclass(frozen=True)
class YouTubeSensorEntityDescription(SensorEntityDescription, YouTubeMixin):
"""Describes YouTube sensor entity."""
SENSOR_TYPES = [ SENSOR_TYPES = [
YouTubeSensorEntityDescription( YouTubeSensorEntityDescription(
key="latest_upload", key="latest_upload",