Add optional dsmr timestamp sensor (#104979)

* Add optional timestamp sensor

* Apply suggestions from code review

Remove "timestamp" translation

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
This commit is contained in:
dupondje
2023-12-05 14:28:57 +01:00
committed by GitHub
parent c4fbc78c05
commit db9d6b401a

View File

@@ -78,6 +78,13 @@ class DSMRSensorEntityDescription(SensorEntityDescription):
SENSORS: tuple[DSMRSensorEntityDescription, ...] = (
DSMRSensorEntityDescription(
key="timestamp",
obis_reference=obis_references.P1_MESSAGE_TIMESTAMP,
device_class=SensorDeviceClass.TIMESTAMP,
entity_category=EntityCategory.DIAGNOSTIC,
entity_registry_enabled_default=False,
),
DSMRSensorEntityDescription(
key="current_electricity_usage",
translation_key="current_electricity_usage",