I have an alarm clock setup that uses input_datetime.manual_alarm as an input. I have a HAdashboard setup that I would like to show the datetime in a user friendly format. i.e. “9:30 PM”
The datetime is setup without using a date in configuration.yaml
input_datetime:
manual_alarm:
name: Manual Alarm Time
has_date: false
has_time: true
If I put
{{ states.input_datetime.manual_alarm.state}}
in the template developer tool I get
06:35:00
So I was thinking my template should be something like this…
On systems where Unix time is stored as a signed 32-bit number, the largest value that can be recorded is 2147483647 (231 − 1), which is 03:14:07 Tuesday, 19 January 2038 UTC. The following second, the clock will wrap around to negative 2147483648 (−231), which is 20:45:52 Friday, 13 December 1901 UTC. This is referred to as the Year 2038 problem .
Similarly there’s a lower date limit and your example predates it.
Sorry about that. For my tests I used an input_datetime with a completely different name. At the last second I replaced its name with yours … and made a copy-paste error (and needlessly included .state.)!
Glad to hear it ultimately worked out for you (and I’ve corrected my original post).