I stumbled upon this thread while looking for a solution to a similar problem. What I’ve discovered is that the “-” notation in Jinja2 for strftime (like %-I) works on normal Home Assistant installs on Rasbian or Ubuntu but doesn’t work on Hass.IO. I wanted a 12 hour clock with no leading zero and came up with the following:
HI Xirixiz,
seems this would be of interest to the MijnAfvalWijzer component also? both the component and template sensors might be simplified?
have a look if you would.
Cheers,
Marius
I’m confused, it’s doing exactly what you are telling it. its displaying the word ‘day’ with a space, then the weeday with a space then the month… whats not working?
Hmm I thought I would get the day but now I understood that I should put another variable. I tried something like {{now (). Day () + ‘de’ + months [now (). Month-1] + ’ ]}} to get “DAY de MONTH de YEAR” but its not working.
"{{ as_timestamp(states.calendar.richard.attributes.end_time) | timestamp_custom('%a, %b %d at %r') }}"
It will return a text like this: Tue. Oct 16 at 11:30:00 AM
(an upper case a will give you full name of day, upper case b will give you full name of month)
The script I use is unix based. So the question is, on hass.io, when you select the country, does it also change the lower level unix/linux country code?
Template sensors will no longer auto update if we can’t find relevant entities in the template.
You’ll want to review your template sensors and consider adding relevant `entity_id` entries or
use the new `homeassistant.update_entity` service.