YAML & Jinja Templating Course Episode 1: Expressions, Statements, Comments, Variables, and Filters

  Рет қаралды 20,758

Smart Home Junkie

Smart Home Junkie

Күн бұрын

Пікірлер: 94
@SmartHomeJunkie
@SmartHomeJunkie 9 ай бұрын
What do you think about YAML and Jinja? Do you rather want to do everything using the UI of Home Assistant, or do you like to program your own advanced templates? Let me know in the comments!
@Tafmie
@Tafmie 8 ай бұрын
Thank you very much Ed! This is a series I have been waiting for for a long time. I'm already looking forward to the next episode!
@jp_baril
@jp_baril 8 ай бұрын
I want to do everything using the UI, but being able to at least understand existing yaml/jinja code is always useful.
@hi-ccowboy7983
@hi-ccowboy7983 8 ай бұрын
I prefer YAML and Jinja. The UI is good, but I find it easier to visualize what I’m doing by looking at the code.
@singaporepastor
@singaporepastor 8 ай бұрын
Excellent! It’s amazing how rare it is to find simple explanations for this stuff
@ianrobson9612
@ianrobson9612 8 ай бұрын
This series is going to be a lot of help. Thanks Ed
@vancitydadbod
@vancitydadbod 8 ай бұрын
Looking forward to the rest of the series!
@peterg91
@peterg91 2 ай бұрын
This video just hits my current 1-week-long campaign to dive into JINJA and YAML, thank you!
@waltervos8537
@waltervos8537 8 ай бұрын
Eindelijk voor mij meer duidelijkheid over het gebruik van Yaml en Jinja. Hier zat ik op te wachten. Dank je voor de heldere uitleg.
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Dank je wel voor je fijne reactie!
@major_west
@major_west 8 ай бұрын
I've been struggling with YAML and templates. This is greatly appreciated!
@edwaaij4752
@edwaaij4752 8 ай бұрын
Hier was ik al een tijdje naar opzoek. Eindelijk Geweldig!
@richardharnwell3331
@richardharnwell3331 8 ай бұрын
This is great! Really looking forward to the rest of this course!
@stefan-lupo-pelzl
@stefan-lupo-pelzl 8 ай бұрын
I am sure many HA users will love to follow your series - including me. Great work. These tutorials will certainly increase the reach of your channel!
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Thank you so much for your support! I'm glad you're enjoying the tutorials.
@holohane
@holohane 8 ай бұрын
Hi Ed, great video. I’ve been looking for something like this for a while. Even just explaining the difference between jinja and YAML is a big help. Thanks Eddie
@dotmhd
@dotmhd 8 ай бұрын
Hello, just wanted to tell you that I love your channel, you do a great job explaining everything we need to make our own Home Assistant setup. I hope someday you'll reach the million subscribers you deserve !
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Thank you so much for your kind words! ❤️
@wwolfram33
@wwolfram33 8 ай бұрын
Thank you for this type of content, as I could not find tutorials with explanations like this. I will begin my study of these episodes this weekend!
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
I'm glad you found the content helpful! Enjoy your weekend study session!
@krzysztofkomornicki7007
@krzysztofkomornicki7007 8 ай бұрын
This is exactly what was looking for. Excellent job, Ed! Thank you so much for that!
@SmartHomeJunkie
@SmartHomeJunkie 7 ай бұрын
Thanks! I'll make sure to keep up the good work to meet your high expectations!
@DeliberateGeek
@DeliberateGeek 8 ай бұрын
Great content, as always! The Jinja documentation is very comprehensive, however, it's a much better reference than it is a tutorial. I'm a developer by trade and still struggled with it. Your explanations of the basics opened up a whole new understanding for me, which will allow me to take advantage of the excellent reference material on the Jinja site!
@Kriss5054
@Kriss5054 4 ай бұрын
Great idea ! Even if I’m not a beginner, I learned a few interesting things. Thanks.
@hi-ccowboy7983
@hi-ccowboy7983 8 ай бұрын
Just what I needed! Super thanks!
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Thanks for your support!
@pjuhl2313
@pjuhl2313 8 ай бұрын
I'm not super comfortable with YAML or Jinja so I'm looking forward to these. Thanks Ed!
@scottwhitaker1067
@scottwhitaker1067 8 ай бұрын
Another top notch video. Looking forward to this series!
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Thanks!
@jeanlouisBarre
@jeanlouisBarre 2 ай бұрын
Very useful, I wish I would have seen this before ! . There is a not documented JINJA filter : | bool that convert on or off that are strings to boolean true / false. This allows to use logical operation such as AND OR NOT easily. Of course one could use {{ is_state('light.kitchen', "on") }} but for logical expression such as {{ states('light.kitchen') | bool and states('light.garage') | bool }} bool filter can be useful. binary_sensor or input_boolean states are string and are not boolean. Therefore one has to use {{ states('input_boolean.xy') | bool }} to give a true / false result
@kevinhenryviii
@kevinhenryviii 8 ай бұрын
I’m looking forward to this although I will go through each one slowly as I am a complete novice to this. Thanks Ed👍🏻
@ElishaiPoran
@ElishaiPoran 8 ай бұрын
Thank you very much and very important and also allays concerns for new HA users.
@SmartHomeJunkie
@SmartHomeJunkie 7 ай бұрын
Thank you for your kind words, they mean a lot to me!
@LS-on6qf
@LS-on6qf 6 ай бұрын
Excellent! short and useful introductory content
@cedricdelecole3964
@cedricdelecole3964 8 ай бұрын
Thanks a lot for this ! Using the code is indeed giving more flexibility than the UI, if we need more advanced features to be developped !
@donnyf12
@donnyf12 8 ай бұрын
Thanks so much for this. This is great content! Can't wait for more
@homeautomatorza
@homeautomatorza 8 ай бұрын
Thanks Ed This is great content which will help a great many, linking back now!
@emms-place
@emms-place 8 ай бұрын
Great video Ed, Cant wait for the rest in the series
@drumslapper
@drumslapper 8 ай бұрын
Thanks Ed, looking forward to your clear explanations.
@robRobblah
@robRobblah 8 ай бұрын
Great job!! so clear. and super helpful. UI is great for most things, but some creative out of the box things require programming!
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
I appreciate your positive feedback! It means a lot to me.
@pdz7197
@pdz7197 8 ай бұрын
Grate job. Waiting for next one.
@robertdon-duncan7954
@robertdon-duncan7954 8 ай бұрын
Thanks so much Ed for the simple explanations, I'm just getting into writing some custom code...without quite understanding what it is I'm writing. Trying to do some neat calculations around my energy consumption. This first video has already given me some confidence to keep going with it. Really looking forward to the rest of the series! Hoping you might go into calculations in some depth?
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Yeah, that will be covered too.
@MaWildcatHass
@MaWildcatHass 3 ай бұрын
Muchas gracias, muy útil el vídeo y la lista promete....
@daveforrester61
@daveforrester61 8 ай бұрын
I love these tutorial type videos. I often use someone elses JINJA for what it does, without actually understanding how it does it. This for example: state: "{{ min([float(states('sensor.solaredge_m1_ac_power'), 0), 0]) | abs() }}" Hopefully you'll go down to the level I need to understand what this is doing to my sensor value, then I can replicate it and understand it. Thanks.
@sygad1
@sygad1 8 ай бұрын
At last, i've been looking for a tutorial about this.
@phgoossens
@phgoossens 4 ай бұрын
Excellent video Ed! To answer your question, I started my HA many years ago when everything could only be done thru a yaml file. I believe there was no UI for dashboarding. Now I'm switching more and more to the UI. But up to now I mainly copy-pasted online pieces of code. Now I want to understand yaml and jinja and being able to build something from scratch. One of those things is the integration of my speed pedelec in combination with a Shelly plus plug to monitor the charging of the battery. When the battery hits the required loaded capacity, the Shelly plug droppes the charging process. But I''ve a little question about using variable. I followed your example but get an error message. I added a variable in my configuration.yaml as shown in your video. template: {% set accucapaciteit = "983" %} It gives me the message: Error loading /config/configuration.yaml: while scanning for the next token found character '%' that cannot start any token What am I doing wrong?
@sevagjb
@sevagjb 8 ай бұрын
Wow, that is awesome! Thanks Ed.
@skm7812
@skm7812 5 ай бұрын
Well done! Thank you.
@TonkaowGaming
@TonkaowGaming 8 ай бұрын
The series we're waiting for
@DeividasNarmontas
@DeividasNarmontas 8 ай бұрын
Nice! It's very useful!
@enriqueronda7239
@enriqueronda7239 6 ай бұрын
Great video. Thank you.
@ericbelanger6900
@ericbelanger6900 8 ай бұрын
Super useful. Thanks ❤
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Thank you for your kind words
@ictstelucjam3604
@ictstelucjam3604 8 ай бұрын
Great video Ed! Love it, can't wait until next video. After the hole course maybe I can leave TheFes alone 🙂
@TheFes
@TheFes 8 ай бұрын
Always happy to help
@geoffreycoan
@geoffreycoan 8 ай бұрын
Looks to be a really useful course Ed. I find Jinja and the differences between {{ and {% quite hard to understand and it usually takes several attempts before I can get my code to work!
@mikaellume4657
@mikaellume4657 8 ай бұрын
Great educatives videos as usual. Do you plan for an episode about how to deal with Date and Time in Jinja? Cheers
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Yes sure!
@Shaq2k
@Shaq2k 8 ай бұрын
Looking forward to it. Please go deep :)
@gerwingal4430
@gerwingal4430 8 ай бұрын
This will help a lot Ed, would be great if you could also touch upon calculating with values ( adding or subtracting, …) further a great video as always.
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
That will be absolutely covered!
@bliblabl8149
@bliblabl8149 8 ай бұрын
Great vid!
@danielbraun3503
@danielbraun3503 3 ай бұрын
Thanks, thanks, thanks!
@manfredzimmer1199
@manfredzimmer1199 8 ай бұрын
👍👍👍 sounds good 👍👍
@berrnardflach
@berrnardflach 8 ай бұрын
Awesome. Thanks
@francoisgrandcollot1027
@francoisgrandcollot1027 7 күн бұрын
Great, thanks for discovering jinja. I have a question, how to get the daily consumption from this template " sensor.linky_papp is an instantaneous power in W " {% set kW_Grid = states('sensor.linky_papp') | float %} {{ (kW_Grid) / 1000| round(0, default=0) }}. Thank you for your help and happy new year
@jedi939
@jedi939 2 ай бұрын
Thank you for doing this course. It is very helpful. If possible, I would prefer the examples to be larger on screen. They are hard to see if watching on a mobile phone.
@SmartHomeJunkie
@SmartHomeJunkie 2 ай бұрын
I don't think developing templates on a mobile phone is an option...
@vette5808
@vette5808 8 ай бұрын
Is there a way to get the embed code of a live streaming rtsp ip cam running in picture glass?
@henriv3773
@henriv3773 Ай бұрын
Great course! It would help a lot if you would speek a bit slower so that we can make screenshots of the crucial images.
@SmartHomeJunkie
@SmartHomeJunkie Ай бұрын
You can slowdown the speed in KZbin.
@michaelthompson657
@michaelthompson657 8 ай бұрын
Seems very hard 😂 I cant get the hang of templates!
@Nick_1976
@Nick_1976 8 ай бұрын
Brilliant..
@Siliconpixel
@Siliconpixel 8 ай бұрын
Very useful thanks. I did find the pace a bit fast throughout. You need time to listen to what you are saying and also take in what’s being shown on screen. Nice production, great content as always though 😊
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Thanks. Did you know that you can slow down the video in KZbin? There's an option in the settings of the video.
@GuusdeRuyter
@GuusdeRuyter 8 ай бұрын
great initiative. Please slow down a bit and please do not use dark mode, the code examples are hardly readable. Looking forward to the next episode.
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Thanks. You can use the pause button or set playback to a slower speed. I will still use dark mode. Sorry. 🙃
@scottwood646
@scottwood646 8 ай бұрын
Thx for the video. I am also having a hard time seeing the code. Could you maybe zoom in more?
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
On what device are you watching this? It should be very clear on a desktop PC. These tutorials are not meant to watch on mobile devices because you will create templates on a desktop PC anyway.
@scottwood646
@scottwood646 8 ай бұрын
@@SmartHomeJunkie 70 inch screen in my living room mainly sitting 12 feet away. Looking at it in my office on my 32 inch monitor on my PC is not much better. For example, when you talked about adding comments, the text is not much different from the dark background. I have seen other videos where they zoom in a lot more on the text as they talk about it. That helps. to my eyes, the dark background is harder to see the text too. Thx again for the videos. I have watched you for a while now and enjoy your videos a lot.
@dirkpennings9683
@dirkpennings9683 6 ай бұрын
Top Ed
@mcfarlde
@mcfarlde 8 ай бұрын
Take it one step further and show the use in node red please.
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
Sorry, I don't do Node Red
@Celeb2022MC
@Celeb2022MC 3 ай бұрын
Here is my suggestion, play time and focus on the commands instructions is less than your video also size of the window is small while explaining syntax
@rolandboni8057
@rolandboni8057 8 ай бұрын
YAML means 'YAML Ain't Markup Language'. It's a recursive acronym
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
It depends on whom you ask 🤣
@rolandboni8057
@rolandboni8057 8 ай бұрын
​@@SmartHomeJunkieCheck the official yaml homepage
@rolandboni8057
@rolandboni8057 8 ай бұрын
@@SmartHomeJunkie The official homepage of yaml says something different
@SmartHomeJunkie
@SmartHomeJunkie 8 ай бұрын
@@rolandboni8057 I used this source, but don't take it too seriously: www.redhat.com/en/topics/automation/what-is-yaml#
@rolandboni8057
@rolandboni8057 8 ай бұрын
@@SmartHomeJunkie neither do I 😎
Mastering Scripts in Home Assistant: A Comprehensive Guide
14:00
Smart Home Junkie
Рет қаралды 51 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Easy & Effective: The Best 5 Home Assistant Automations for Beginners
17:13
Introduction to Jinja Templating
17:03
Real Python
Рет қаралды 42 М.
ChatGPT in Home Assistant for LESS than $0.01 a DAY!!!
19:30
Daniel Barczak
Рет қаралды 3,1 М.
Mastering Home Assistant Templates: A Beginner's Guide
23:56
SlackerLabs
Рет қаралды 58 М.
Create your OWN Template Sensor with Home Assistant Coding Tutorial
13:30
Smart Home Makers
Рет қаралды 59 М.
Save Money Now: Track Dynamic Energy Prices in Home Assistant
15:38
Smart Home Junkie
Рет қаралды 36 М.
YAML & Jinja course Episode 3: Conditionals & Loops (w/Examples)
10:44
Smart Home Junkie
Рет қаралды 9 М.
YAML Basics // Level Up Your Home Assistant Skills
22:58
This Smart House
Рет қаралды 84 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН