How do I get any time references using the 24hr clock as is usual in the UK? I’ve seen other questions similiar to this, but keep seeing the answer that this was fixed - so what am I doing wrong?
Ok - I hang my head in shame on this one… The sensors that bothered me most were the sunrise and sunset ones which are templated values. Now that I have changed it to:-
value_template: >
{{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(' %H:%M') | replace(" 0", "") }}
It now shows as the 24 hr clock as you would expect - the example showed
timestamp_custom(' %I:%M %p')
Which of course is the 12 hr clock…
Hopefully someone will benefit from my stupidity!
3 Likes
Thanks - got caught out by exactly the same thing!
That just helped me, too!