diff --git a/homeassistant/components/discovergy/sensor.py b/homeassistant/components/discovergy/sensor.py index 0f5ace28dd7..c0c610fa98a 100644 --- a/homeassistant/components/discovergy/sensor.py +++ b/homeassistant/components/discovergy/sensor.py @@ -30,9 +30,9 @@ from .const import DOMAIN, MANUFACTURER PARALLEL_UPDATES = 1 -@dataclass -class DiscovergyMixin: - """Mixin for alternative keys.""" +@dataclass(kw_only=True) +class DiscovergySensorEntityDescription(SensorEntityDescription): + """Class to describe a Discovergy sensor entity.""" value_fn: Callable[[Reading, str, int], datetime | float | None] = field( default=lambda reading, key, scale: float(reading.values[key] / scale) @@ -41,11 +41,6 @@ class DiscovergyMixin: scale: int = field(default_factory=lambda: 1000) -@dataclass -class DiscovergySensorEntityDescription(DiscovergyMixin, SensorEntityDescription): - """Define Sensor entity description class.""" - - GAS_SENSORS: tuple[DiscovergySensorEntityDescription, ...] = ( DiscovergySensorEntityDescription( key="volume",