mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Remove DSMR entity descriptions required fields mixins (#104002)
This commit is contained in:
parent
17f0676483
commit
ce1e6ce006
@ -67,21 +67,13 @@ EVENT_FIRST_TELEGRAM = "dsmr_first_telegram_{}"
|
|||||||
UNIT_CONVERSION = {"m3": UnitOfVolume.CUBIC_METERS}
|
UNIT_CONVERSION = {"m3": UnitOfVolume.CUBIC_METERS}
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass(kw_only=True)
|
||||||
class DSMRSensorEntityDescriptionMixin:
|
class DSMRSensorEntityDescription(SensorEntityDescription):
|
||||||
"""Mixin for required keys."""
|
|
||||||
|
|
||||||
obis_reference: str
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
|
||||||
class DSMRSensorEntityDescription(
|
|
||||||
SensorEntityDescription, DSMRSensorEntityDescriptionMixin
|
|
||||||
):
|
|
||||||
"""Represents an DSMR Sensor."""
|
"""Represents an DSMR Sensor."""
|
||||||
|
|
||||||
dsmr_versions: set[str] | None = None
|
dsmr_versions: set[str] | None = None
|
||||||
is_gas: bool = False
|
is_gas: bool = False
|
||||||
|
obis_reference: str
|
||||||
|
|
||||||
|
|
||||||
SENSORS: tuple[DSMRSensorEntityDescription, ...] = (
|
SENSORS: tuple[DSMRSensorEntityDescription, ...] = (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user