Hours until kick off template #187
mehuman
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.
-
I build the hours until kick off into a helper using a template. The use case is to show a conditional card on a dashboard a couple of days ahead of game time. It would be great if this was added as an attribute that I could just reference.
Sharing here in case it's helpful for others
{{ (((as_timestamp(state_attr('sensor.TEAM', 'date'))) - as_timestamp(now()))/60/60 )|round() }}
This will give a whole number like
32
representing the hours until kick offBeta Was this translation helpful? Give feedback.
All reactions