diff --git a/homeassistant/components/youtube/sensor.py b/homeassistant/components/youtube/sensor.py index 56c3f960bdf..bc69f92e8fd 100644 --- a/homeassistant/components/youtube/sensor.py +++ b/homeassistant/components/youtube/sensor.py @@ -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",