def extra_state_attributes(self) -> dict[str, Any]:
        """Return the state attributes of the generic entity."""
        attributes: dict[str, Any] = {}
        attributes.update(self._static_state_attributes)
        if self._data_point.is_valid:
            attributes[ATTR_VALUE_STATE] = (
                HmEntityState.UNCERTAIN if self._data_point.state_uncertain else HmEntityState.VALID
            )
        else:
            attributes[ATTR_VALUE_STATE] = HmEntityState.NOT_VALID
        return attributes
Return the state attributes of the generic entity.
custom_components/homematicip_local/generic_entity.py