You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering whether it is possible to introduce support for the timeago library (https://pypi.org/project/timeago/) or something like it, to make it easy to provide human readable duration statements when using templates in the GUI.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm wondering whether it is possible to introduce support for the
timeago
library (https://pypi.org/project/timeago/) or something like it, to make it easy to provide human readable duration statements when using templates in the GUI.For example,
timeago
can be as simple as:It would be very nice if it was possible in the GUI to use jinja templates like:
{{ states('sensor.outside_temperature') }}°, {{ timeago.format(states.sensor.outside_temperature.last_updated) }}
Which would yield:
This would save a heap of manual jinja manipulation to approximate a similar result.
Beta Was this translation helpful? Give feedback.
All reactions