Mastering Home Assistant Templates: A Beginner's Guide

preview_player
Показать описание
Home Assistant Templates 101

Let's walk through everything you need to know to get started making templates. I explain the foundational blocks of templates, walk you through how to transform your home assistant data using math, and wrap it up giving to a look at some different ways you can use templates.

If you feel overwhelmed with #homeassistant templates, dont worry. After this video you will have everything you need to get started.

Code Examples:
Example Sensors:

Jinja Examples from Temaplte Panel:

Today Is / Month Is:

Jinja Resources:

Crash course for Beginners:

Full Jinja Documentation (Use Search when needing syntax for functions):

Video Chapters:
00:00 - Home Assistant Templates 101 - Intro
01:10 - Home Assistant Template Updates as of 2023.4
01:44 - What is Jinja?
03:07 - Template Basics: What do those Curly Braces mean?
06:57 - Home Assistant Entities in Templates
11:44 - Transform Home Assistant Entities using Templates
17:22 - Advance Templates - A Quick Look
23:00 - More to Come

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:

Рекомендации по теме
Комментарии
Автор

What parts of home assistant templates are giving you the most trouble?

SlackerLabs
Автор

Dark mode may be good when you are on the box but in this video light mode would've been better I think. The change in colour helped but the original colours were difficult.

vicb
Автор

Jeff, you are an awesome educator! I have struggled with templates for ages spending so much time getting my head around things in the template development panel testing and retesting until I understood why things didn't or by some fluke worked. In this one video you broke through 3 years of my lack of understanding of some very simple basic format rules eg: {{ }} {% %} and | int and also the >. I have to also admit that your Github pages are awesome examples. I take my hat off to your presentation and education magic. Thankyou.

gnlldss
Автор

Dude you're a legend, I only needed 10 mins of your video to make complete sense of a template sensor I was struggling with!

chimeranzl
Автор

This is the jinja video I always wanted when starting out. Great work!

singaporepastor
Автор

Great Video! It could be improved by using a different color scheme for your console (maybe that's not even possible). It was really hard to read.

samuraiintellectual
Автор

Excellent job.
More Jinja videos please. A whole series (4-5) would be great

OPB
Автор

This is the best video I've ever seen on templating! It really unlocks the potential of HA, and it's always where I struggle the most in my projects. Well done!

makeitworktech
Автор

Super straight forward guide! Thanks Jeff!

lawjamesr
Автор

Thanks so much Jeff - this is the most helpful Templates video I have seen. I have managed to cobble together 1 on my own, but did not fully understand why it worked when the 22 non-working attempts preceding the success failed. This explains it for me. Well done!

fredarmstrong
Автор

Clear explanation. The added yaml code and the sequel are important reasons to continue following this series of videos. Thank you very much. I have learned a lot and hope for more. Tip: the yaml code on the video is difficult to read. Better contrast letters and background color will help.😀

edwaaij
Автор

Thanks for the simple guide to templates. Although I am already using them, I copied most of the code without fully taking in what they did. You have clarified the usage in an easily understandable way. I am looking forward to the next video!

IanTakats
Автор

Hello,

You've just shown me just how powerful and interesting these templates can be! Many thanks!

philippe
Автор

I really appreciate the effort to make this tutorial and the effort it took to figure out where to start to help those of us who have no formal education in coding. I have used cut/paste then trial/error coding for HA for years, now I already have way more understanding of what I am doing and how to do it.

rivjr
Автор

Jeff, your videos and GitHub repo have given me so many ideas on things I can do in HomeAssistant. Keep up the great work!
BTW, everyone loves my “Automate the boring stuff” t-shirt

MyCobra
Автор

I created a notification for when each member of my household is home based on some stuff you did before, and it was a pain to try to get it to be generic enough to not repeat a lot of code. I was able to convert it over to a macro easily and it makes things smoother. As a programmer, I hate duplicating stuff, even yaml. Can't wait to see your video on macros for more ideas to automate my home!

JamesRitchieWolfmanWhtwlf
Автор

Let's get that next video on this topic!!! Great info!

One way I use templates a lot is in automations. I'll create an automation and then need another one very similar. I duplicate the automation and edit the yaml of the copy.

Sometimes it's also easier to write logic for an automation in yaml. Then I select template as a condition in the automation and slap the yaml in there. I did that last night because I needed a true or false based on a bunch of math.

Also .. as mentioned.. notifications! HA still doesn't have a good gui to create dynamic notifications.

jmr
Автор

Very good video. Well presented and well explained. I am new to HA and frequently get stuck. I have subscribed.

kslover
Автор

Thanks! This video was awesome and helped clear a few things up for me. And I love your solution for Day of Week / Month of year - excellent implementation.

Dorff_Meister
Автор

Thank you, I think I need to hunt through your other YAML videos so I've a better grasp of the fundamentals... Then I'll research getting the mean value of a very spiky "uv" sensor that I might be able to use when it's darker rather than using sunset. 🙂

mastweiler