1mfaasj
(Bowa)
November 28, 2023, 8:11am
1
Hi
I’ve got one simple question. I’m using the relative time sensor that gives me:
x hours ago
Is there a way to change “hours” to something else? like in my native language?
template:
- sensor:
- name: Uptime relative
state: >-
{{ states("sensor.uptime") | as_datetime | relative_time }}
Thanks
arganto
November 28, 2023, 8:15am
2
Have a look at the more than great Makros from Petro to simplify such tasks (including language support).
Hello community!
As you may know, 2023.4 offers a new global template macro option in Home Assistant.
How does this benefit you? The introduction of this feature allows me to easily share all the templates I’ve helped you create over the years in a single easy-to-use template library! All in your native language!
Introducing…
Easy Time Jinja
A 1-stop-shop for easy time calculations.
Get it from HACS!
These templates are now available in HACS, with a caveat. In order to see templat…