Using string for deviceclass `timestamp`
jbouwh opened this issue · comments
Home assistant logs show message like:
2021-11-19 09:34:36 WARNING (MainThread) [homeassistant.components.sensor] sensor.laatste_statusupdate is providing a string for its state, while the device class is 'timestamp', this is not valid and will be unsupported from Home Assistant 2022.2. Please create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
MQTT publishing must be updated to comply with the new standard.
This issue will be resolved with the coming version of Home Assistant.
I wall change the MQTT value template for the timestamp type sensors and use the updated as_datetime
filter as it gets support to translate UNIX timestamps to datetime
.
Link to PR: home-assistant/core#60126
The issue in HA dev has been solved. So there is no sense or urgency any more. The as_datetime
filter has been updated to support UNIX timestamps as well, so the value template change can be implemented later.