How To: Create A Custom Template Sensor For Next Scheduled Departure #161
iSteve-O
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello fellow Ford owners,
Now that Matthias has added the next scheduled departure attribute to the elveh sensor, I thought I would share how I am using this to display a nice human readable date and time, or if no departure time scheduled it will display "None Scheduled".
First, you want to tap create helper in the UI helper section and choose template as the type, and then sensor as the sub-type.
Give it a name (like 'Next Departure').
Next, paste this template into the state template area and swap in your [VIN] (or your entire entity ID for the range sensor, if changed from default):
Do not specify a unit of measurement, device class (If you try to use timestamp or date it will not function properly), nor state class.
Specify your car as the device if you wish to tie this helper to the car. I like this because it looks like it belongs there.
Under advanced options specify the following availability template, swapping in your [VIN]:
There you have it!
If you don't like the date formatting you can mess with it in the template
('%a, %b %-d, %-I:%M%p'). If you don't like"None Scheduled"you can swap that out for whatever you would prefer it to say.I am using the
mdi:car-clockas my icon.All reactions