mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Remove Discovergy entity description required fields mixin (#104028)
This commit is contained in:
parent
5f13faac76
commit
23ac3248e6
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user