From 153b1947fa9b144fb3b296c2e6d667a8b8d6e4d4 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Tue, 5 Mar 2024 21:43:48 +0100 Subject: [PATCH] Remove entity description mixin in AirNow (#112376) --- homeassistant/components/airnow/sensor.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/homeassistant/components/airnow/sensor.py b/homeassistant/components/airnow/sensor.py index bfe9e92c4a3..258a0c680a7 100644 --- a/homeassistant/components/airnow/sensor.py +++ b/homeassistant/components/airnow/sensor.py @@ -51,19 +51,14 @@ ATTR_LEVEL = "level" ATTR_STATION = "reporting_station" -@dataclass(frozen=True) -class AirNowEntityDescriptionMixin: - """Mixin for required keys.""" +@dataclass(frozen=True, kw_only=True) +class AirNowEntityDescription(SensorEntityDescription): + """Describes Airnow sensor entity.""" value_fn: Callable[[Any], StateType] extra_state_attributes_fn: Callable[[Any], dict[str, str]] | None -@dataclass(frozen=True) -class AirNowEntityDescription(SensorEntityDescription, AirNowEntityDescriptionMixin): - """Describes Airnow sensor entity.""" - - def station_extra_attrs(data: dict[str, Any]) -> dict[str, Any]: """Process extra attributes for station location (if available).""" if ATTR_API_STATION in data: