mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Remove entity description mixin in Youtube (#112975)
This commit is contained in:
parent
65624a9491
commit
5bfbe00c57
@ -27,9 +27,9 @@ from .const import (
|
||||
from .entity import YouTubeChannelEntity
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class YouTubeMixin:
|
||||
"""Mixin for required keys."""
|
||||
@dataclass(frozen=True, kw_only=True)
|
||||
class YouTubeSensorEntityDescription(SensorEntityDescription):
|
||||
"""Describes YouTube sensor entity."""
|
||||
|
||||
available_fn: Callable[[Any], bool]
|
||||
value_fn: Callable[[Any], StateType]
|
||||
@ -37,11 +37,6 @@ class YouTubeMixin:
|
||||
attributes_fn: Callable[[Any], dict[str, Any] | None] | None
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class YouTubeSensorEntityDescription(SensorEntityDescription, YouTubeMixin):
|
||||
"""Describes YouTube sensor entity."""
|
||||
|
||||
|
||||
SENSOR_TYPES = [
|
||||
YouTubeSensorEntityDescription(
|
||||
key="latest_upload",
|
||||
|
Loading…
x
Reference in New Issue
Block a user