Here's episode five of this YAML and Jinja programming course! In this episode of our Jinja and YAML course, we'll cover calculations and date and time functions. Learn how Jinja works and how to use it in Home Assistant with this tutorial!
⭐ You can download all the code that I created for the course at: https://ko-fi.com/s/84ab3c5875⭐
Links referred to in this video:
* The YAML and Jinja Course Playlist: https://www.youtube.com/playlist?list=PLKuGrHcHLKMiUTClEE8vb60m9v3ijFEhQ
Blog version: https://www.smarthomejunkie.net/yaml-jinja-templating-course-episode-5-math-date-time
👉 Get the desktop clock/message ticker that I use in the video: https://youtu.be/N0NKPJzGHuA
⭐⭐⭐
* Join this channel to get access to perks: 📺 https://www.youtube.com/c/smarthomejunkie/join
* Please consider becoming my patron 🏅 at https://www.patreon.com/join/smarthomejunkie
* Or please support me by buying me a ☕ at https://ko-fi.com/smarthomejunkie/
* Or sponsor me through PayPal at https://paypal.me/smarthomejunkie
⭐⭐⭐
⭐ If you want me to create a review of your product, please visit this page for information and rates: https://www.smarthomejunkie.net/review-and-advertisement-information/ ⭐
My Devices: https://github.com/smarthomejunkie/MyDevices
Instagram: https://www.instagram.com/smarthomejunkie/
X: https://www.x.com/smarth0mejunkie
Mastodon: https://mastodon.world/@smarthomejunkie
Facebook: https://www.facebook.com/smarthomejunkie/
TikTok: https://www.tiktok.com/@smarthomejunkie
Discord: https://discord.gg/at8v5hW
Music by:
* 2TECH-AUDIO: https://2tech-audio.bandcamp.com/
00:00:00 Introduction
00:00:34 Calculations
00:01:26 Add
00:01:39 Subtract
00:01:59 Divide
00:02:26 Remainder
00:02:56 Multiply
00:03:20 Power
00:03:40 NOT
00:04:01 Calculation example in Home Assistant
00:05:17 Date & Time
00:05:25 NOW
00:05:29 Formatting Dates and Times
00:06:10 retrieving individual days, months, years, hours, minutes, seconds
00:07:03 UTCNOW
00:07:18 Calculate with Date & Time
00:07:33 Time_since
00:08:36 Time_until
00:09:08 Timedelta
00:09:36 As_timedelta
00:10:10 Timestamps
00:12:32 Bloopers
#homeassistant #jinja #yaml #templates #templating #programming #calculations #date #time #tutorial