mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +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
|
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",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user