Remove unused attributes in EDL21 integration (#91922)

This commit is contained in:
Stephan Uhle 2023-04-25 09:50:23 +02:00 committed by GitHub
parent 48546c77b5
commit b56f0ad668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,12 +413,6 @@ class EDL21Entity(SensorEntity):
self._telegram = telegram
self._min_time = MIN_TIME_BETWEEN_UPDATES
self._last_update = utcnow()
self._state_attrs = {
"status": "status",
"valTime": "val_time",
"scaler": "scaler",
"valueSignature": "value_signature",
}
self._async_remove_dispatcher = None
self.entity_description = entity_description
self._attr_unique_id = f"{electricity_id}_{obis}"
@ -462,15 +456,6 @@ class EDL21Entity(SensorEntity):
"""Return the value of the last received telegram."""
return self._telegram.get("value")
@property
def extra_state_attributes(self) -> Mapping[str, Any]:
"""Enumerate supported attributes."""
return {
self._state_attrs[k]: v
for k, v in self._telegram.items()
if k in self._state_attrs
}
@property
def native_unit_of_measurement(self) -> str | None:
"""Return the unit of measurement."""