From Home Assistant 2021.12.0 sensors with device_class == timestamp need be be assigned a native datetime type. The current implementation uses string formatted timestamps. But this will give warnings in the log.
This PR changes the value_template for the MQTT timestamp sensors of omnikdatalogger.
The current filter |timestamp_local will be replaced with |as_datetime. The as_datetime filter will only allow time formatted strings with the current release of Home Assistant. The Home Assistant PR https://github.com/home-assistant/core/pull/60126 will add a UNIX timestamp filter to allow a direct conversion to datetime.
For the PR to be merged it is needed that this new functionality of the as_datetime filter also comes available in Home Assistant 2021.12.0.
From Home Assistant 2021.12.0 sensors with
device_class
==timestamp
need be be assigned a nativedatetime
type. The current implementation uses string formatted timestamps. But this will give warnings in the log.This PR changes the
value_template
for the MQTTtimestamp
sensors of omnikdatalogger. The current filter|timestamp_local
will be replaced with|as_datetime
. Theas_datetime
filter will only allow time formatted strings with the current release of Home Assistant. The Home Assistant PR https://github.com/home-assistant/core/pull/60126 will add a UNIX timestamp filter to allow a direct conversion to datetime. For the PR to be merged it is needed that this new functionality of theas_datetime
filter also comes available in Home Assistant 2021.12.0.