filmov
tv
Mastering Home Assistant Templates: Intro to Date and Time
Показать описание
The next installment of my Mastering Home Assistant Templates Series.
This video is all about time and date. We will be covering:
- How to get the current time and use it in your templates.
- Saving time for use later in templates
- How to do timestamp Math
- the difference between the last_changed and the last_updated timestamps
- When to use as_datetime and as_timestamp
- And how to compare two points in time
- So we know how many days until a date
- If a date was in the past
- if a date is in the future
- Did it happen in the last 24 hours
- Or is it happening today
Lots to cover, so this one is long. So use the chapters below to jump around:
Video Chapters:
00:00 - Introduction to Time and Date Templates in Home Assistant - Intro
01:18 - What to Expect in this video
02:31 - Quick Jinja Recap
04:40 - Using Now() to get the current time
06:20 - Create a TTS Greeting using Now()
08:16 - Saving the current time of events to use later in templates
13:29 - Using Replace() to get a specific point in time based on current time
16:46 - Home Assistant's time and Date Integration provides some helpful entities
19:25 - Using an entity's last changed and last updated timestamp in your templates
21:17 - Intro to Timestamp Math in your Templates
22:51 - The difference between as_datetime and as_timestamp and when to use them
25:49 - Using as_timestamp to get the number of days until a date in the future
28:27 - A Template to check if a timestamp happened in the past
29:57 - A Template to check if an Automation fired in last 24 hours
31:16 - Using relative_time() to get how much time has past since a point in time
32:00 - Check to see if a calendar event is happening today
Resources:
Who am I?
My Name is Jeff. I am an DIY-er and Automator of boring things. And, of course, a huge Home Assistant fan. Oh, I also live in a house that tweets.
Follow Me:
And if you like this video you could always fuel my automation habit -
One Time Donation:
Cash App: $slackerlabs
.
Video Gear:
This video is all about time and date. We will be covering:
- How to get the current time and use it in your templates.
- Saving time for use later in templates
- How to do timestamp Math
- the difference between the last_changed and the last_updated timestamps
- When to use as_datetime and as_timestamp
- And how to compare two points in time
- So we know how many days until a date
- If a date was in the past
- if a date is in the future
- Did it happen in the last 24 hours
- Or is it happening today
Lots to cover, so this one is long. So use the chapters below to jump around:
Video Chapters:
00:00 - Introduction to Time and Date Templates in Home Assistant - Intro
01:18 - What to Expect in this video
02:31 - Quick Jinja Recap
04:40 - Using Now() to get the current time
06:20 - Create a TTS Greeting using Now()
08:16 - Saving the current time of events to use later in templates
13:29 - Using Replace() to get a specific point in time based on current time
16:46 - Home Assistant's time and Date Integration provides some helpful entities
19:25 - Using an entity's last changed and last updated timestamp in your templates
21:17 - Intro to Timestamp Math in your Templates
22:51 - The difference between as_datetime and as_timestamp and when to use them
25:49 - Using as_timestamp to get the number of days until a date in the future
28:27 - A Template to check if a timestamp happened in the past
29:57 - A Template to check if an Automation fired in last 24 hours
31:16 - Using relative_time() to get how much time has past since a point in time
32:00 - Check to see if a calendar event is happening today
Resources:
Who am I?
My Name is Jeff. I am an DIY-er and Automator of boring things. And, of course, a huge Home Assistant fan. Oh, I also live in a house that tweets.
Follow Me:
And if you like this video you could always fuel my automation habit -
One Time Donation:
Cash App: $slackerlabs
.
Video Gear:
Комментарии