Remove last_knx_update extra_state_attribute from KNX BinarySensor and Sensor (#58786)

This commit is contained in:
Matthias Alphart 2021-10-31 12:58:17 +01:00 committed by GitHub
parent 1e92e35bff
commit 968e582468
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 11 deletions

View file

@ -19,9 +19,8 @@ from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.restore_state import RestoreEntity
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
from homeassistant.util import dt
from .const import ATTR_COUNTER, ATTR_LAST_KNX_UPDATE, ATTR_SOURCE, DOMAIN
from .const import ATTR_COUNTER, ATTR_SOURCE, DOMAIN
from .knx_entity import KnxEntity
from .schema import BinarySensorSchema
@ -92,7 +91,4 @@ class KNXBinarySensor(KnxEntity, BinarySensorEntity, RestoreEntity):
attr[ATTR_COUNTER] = self._device.counter
if self._device.last_telegram is not None:
attr[ATTR_SOURCE] = str(self._device.last_telegram.source_address)
attr[ATTR_LAST_KNX_UPDATE] = str(
dt.as_utc(self._device.last_telegram.timestamp)
)
return attr