Sorry this ended up being WAY longer than I anticipated and bit more of a raw format than usual but hope it's useful for you, now get out there and template! 👊
@@EverythingSmartHome What i want to do is hide a tab under a password... I created a dummy alarm, added an alarm card, and an automation that detects when the dummy alarm is disarmed, and then shows the "secret panel". That's a lie, i haven't done that, i just want to. lol
This by far the most useful home assistant video for a long time. The Templates have given me and others terrible headaches over the past. This was SO great to see how you in 26 minutes could explain it so simple. I have personally been beaten up when asking about templates in the HA discord support channel. A very unpolite forum
Hello! Thank you very much! Glad you found it useful! Sorry to hear about that on Discord, please do feel free to join our discord, we have an amazing bunch of guys who all help out and of course I spend lots of time there too!
This video saved me a ton of headache and time. Thank you so very much! I wanted an easy way to lump all my door sensors (states) into a single template that I could copy/paste into different automations and after just 7 minutes of the above video I had all the answers I needed to make it happen. Super straight forward tutorial, thank you!
I’ve been templating in HA pretty heavily, but I’ve never seen a tutorial on it yet. Thanks a lot for showing me the basics which I apparently still didn’t understand (i.e. difference between ‘{{‘ and ‘{%’ ) and also showing me something new and that’s setting a parameter of a new binary_sensor. Very usefull. Thanks once again!
There are good HomeAssitant yaml videos out there but you're right this the best "templating" video I think. Reasonably short but gives good core knowledge.
Also I need to thank him for telling me the difference between False and false. One is a statement the other an input boolean. I would have never noticed that!
This video was fantastic, i now get how to read code with if and for loops. Explaining the syntax was super helpful. please don't stop making these videos.
Lewis, this is indeed your best video from my perspective. Two months after watching this video, I have become a power user of template editor and using templates in scripts, automation & integrations. It is really a cool, elegant and very powerful concept once you grasp the fundamentals of it - thanks for explaining it so clearly!!
WoW! Great lesson. Calm and methodical, you got what we beginners need to be able to get templates with all magic {%%} And you repeated this a lot, repetition is the mother of learning! Very well done. Thank you very much!
I think I remember promising to check you out in a reddit sub; watched once and subbed. Been watching ever since. Congrats on 10k!! Please don't worry about the extra time on videos that deserve the time. Would LOVE to see you do more on this subject as well as one on MQTT; a subject I never quite seem to understand as well as I would like.
Brilliant Video, just what we needed after the Image Processing vid... Not really touched templates so that give me just what I needed. Keep up the great work !!
Great video, I like this format and I don't mind the length of the video. Very well presented. Now I feel confident I can create my own templates and even new sensors. 👍
Aaaand there it was. The magician who finally allowed my mind to wrap around templates in HA. Thanks a bunch, you have saved me endless hours of scouring the internet.
Nice job ! me fue muy útil, me encanta que la explicación vaya de la mano con la práctica eso facilita la comprensión del tema. Nice job! It was very useful to me, I love that the explanation goes hand in hand with the practice that facilitates the understanding of the topic
Great Vid. Just wish to clarify that: {{ ... }} are to be used for Expressions (Basically a value that you want to print out) {% ... %} to be used for Statements (When you use a bunch of expressions or other statements together to execute something... like if/else/loops)
Great video and a given addition to my Home Assistant Learning playlist👍🏻 Like you said, I think this is borderline to an advanced topic for people like me who are not developers or coders but very pedagogical so even I can follow but will have to practice a lot😊 Please consider making videos on how to create custom Lovelace cards to display all these new sensor attributes
Nice job! Templates have always seemed unnecessarily complex compared with just writing a few lines of python, but your interactive testing process and examples show it's straightforward once you know the syntax. I'd love to see more of the technical yet powerful tutorials. Maybe a video building on this one about how to integrate a bunch of MQTT topics in to a single sensor with attributes would be useful to viewers? I presume that could be done in a similar way to this tutorial using templates and would make MQTT devices more equivalent with first-class sensors within Home Assistant. A possible general example might be using one of the linux lm_sensors to MQTT scripts or IOT Link for Windows and displaying a graph of multiple sensors in Home Assistant?
Thank you! Yes it is all about knowing that syntax isn't it, but getting there can be difficult! Thanks for your ideas, I'll certainly try to take them forward, I didn't think this video would be popular or I explained very well but seems people really enjoyed it so I'd be happy to add some more examples!
Lewis, I'm a huge fan of your channel. Thanks for everything you do for this community! That being said, your misuse of "statement" and "expression" in this video is driving me mad. You swapped them ;)
I knew I was getting attributes in a way the was suboptimal. Thanks! I know this was just an example but when you rounded to 2 places, multiplied by 100, and didn't change the float to an int that was killing me! 🤣
According to HA Templates, this refers to legacy configuration. Do you have or intend to do an updated tuition on templates? I'm struggling to assign an area to binary_sensor. cheers
Thanks so much for taking time to do these tutorials. Nicely done and explained well!... Now a question on your use case with presence detection based on license plates... How would you detect if its coming home or leaving? - Wouldnt it pick up the licenses plate and set it to home - if its leaving in this scenario? - How could you solve that problem? ... Anyways - Thanks again!
Something like, if already home, assume leaving, if already away, assume arriving??? I haven't a clue how you'd do that via templates though, they're still very much a black art afaic, until I try using them more.
@@Tekwyzard That sounds like maybe the 'helpers' under configuration menu might help here (no pun intended). I believe helpers are basically variables you can set/update as needed?
@@slandshark Probably, yes. I use quite a few boolean 'helpers' for stuff myself, to set, remember or toggle states of various things, and some number inputs and other ' helper' whatnots for controlling when automations happen. As for doing the same using templates, the topic of this video, as I replied to the OP, I haven't a clue, apart from suggesting a possible work flow. I just flounder around trying out templatey stuff I find on the interweb, trying and often failing to adapt them to my needs, while usually spectacularly failing to come to terms with any of the obfuscatory syntax they use.
Great introduction, I learned a lot. But how do you set/assign a value to an entity state ? I have a value that I need for later calculations. How do i write a value to that entity.state, or is there another way of storeing values for later use ?
Hey Lewis, Ive been following your Mushroom dashboard tut, and noticed you used total lights on. How would I go about setting this up as I presume this is a template as well?
A suggestion for another video could be the Statistic and history-statistics. I actually wonder if it's possible to make groups of sensors (statistics from all my motion sensors) and extract statistics of the group entities so I don't I have to make a history stat for each one of them. But a video on how make statistics based on things like a motion sensor. Like time of last movement or total no. of movements today etc. would be great
This is definitely a must read. Thank you so much, impossible to understand templates and the relationship with other HA components without the nice tutorial. However I'm having a little trouble. The action is a service rest_command to which I want to pass values that I get from the template. So how can I reference in the data section of the action a value that is retrieved by a template . I tried many flavours like (under the data section) status: {{test}} this triggers a validation trigger, I tried status: {{"test"}} that sends an empty string, I tried test, that sends the string "test". test is defined in the template section as: {% set test = states(''alarm_control_panel.5656_ccc_zone_4_alarm'')%}' The template works fine, it is tested in the developper section. Thanks again for your dedication to HA
May I asked which affordable smart door lock can easily integrate with Home assistant? I have checked those DIY smart door locks videos on RUclips, but they are too difficult for me. Do you have any recommendations? Thank you!
Sorry I don't have any recommendations for you unfortunately, smart locks in the UK are a little more tricky than other countries so I don't have one yet!
Hi! how can i catch an specific portion of an Third party app notification on my android phone? i mean, i want to catch a notification from my IPTV app, but i comes with the current time, so i need only to catch the part that doesnt change, or a way to include the current time on the template.
Your videos are amazing !! Thanks a lot!!! I wonder if it would be possible to know which user flipped a switch. Is there a method to find out? If I have a Home assistant at home and we are three users, could we know who turned on or off a lamp? Thank in advance!!!
Thanks Dani! You should be able to look in the history log of a device which now in the more recent updates will show you who turn the lights on it off. Hope that helps!
This was a wonderful video, thanks for all your efforts. Hopefully a constructive suggestion, code is very hard to read, especially on a mobile. So every chance you have, can you please use the zoom. Again thanks heaps.
Great video, question how do i print an attribute further down the list i.e. I want the id at the bottom stations: count: 9 cursor: next: '8' results: - address: country: US line1: 7100 Hospital Dr line2: '' locality: Dublin postalCode: '43017' region: OH fuels: - regular_gas - midgrade_gas - premium_gas - diesel id: '140205'
Not everyone has a large screen. Reading this on a regular HD screen is a PITA. On top of that, tiny text in dark blue on a dark background is even harder to read. There are magnifier apps for streaming, or you could do it in Post.
You do a great job on your videos but unfortunately, none of the content on RUclips is relevant any longer because of the changes that have been made to HA. I am unable to get templates working because there is no content available for the current version of HA. Not even the HA documentation is up to date, so I am stuck.
I know I'm way too late for comments (2 months!), but your video will be helpful for ages! Thanks! In your tutorial you use specific statements, syntax etc. that make total sense in the specific examples, but for sure I will need to learn other of such elements to build my own templates. Do you have any link for a cheatsheet or just an easy-to-understand list of the most useful elements in building templates? I found links to the Jinja syntax in the Home Assistant docs, but that's too complex (for me). As my next step I'm looking for something in between your (excellent) beginners tutorial and the over-detailed explanations in the official documentation.
It's never too late to comment, I appreciate it!! I don't unfortunately have a cheat sheet sorry I just the the Jinja2 syntax myself to search for what I'm trying to do, but that is a good idea!
Thanks, but still don't see how I turn this attribute into a usable variable in node red, do i just need to add to configure. yaml? don't understand how I reformat from template test in developers to the the right format for config.yaml. example {{state_attr('device_tracker.life360_myname','latitude')}}. I want to access altitude as a variable in node red. Thanks in advance.
Not sure if anyone said it before, but when programming in general if you're returning a boolean from an if statement, you don't need an if statement. Just return the condition directly - {{ state_attr('image_processing.whatever', 'statistics').calls_remaining > 2485 }}
@@EverythingSmartHome I can see how it would help beginners to see "true" and "false", but I don't think that's a great way to illustrate it. You'd be better off putting {{ 2 + 2 == 4 }} in the template editor and showing that "true" shows up in the results window. The extra if statement is not more "complete", it's redundant.
@@EverythingSmartHome Also sorry to drop in and criticize you without saying nice things - this video is seriously helpful, thanks a ton for making it.
I didn't necessarily mean just the true/false but the if statement as a whole. I'm not saying I'm right and your wrong or vice versa, I'm saying that if I put myself in the shoes of a beginner then for me personally it's easier to see the long way of having the if statement with true and false before moving to the shorthand way after. So that's why I wrote it like that, even if it is redundant. I'm certainly no programmer either but all of the courses I've taken on different languages so far have all taught the long-hand way first in the beginner section before teaching the shorthand. Just my opinion, again doesn't mean it's right
DOnt know if this exists but your loop MISSING breeak statement. Even if it finds something it will continue the loop while it ends, its not efficient. When finds it should stop looping - break the loop.
This is waaaaaaaay past beginner. Where are you getting all the language from? Where is this configuration file? OK , so it's on there - What then? Call service notify? What's that? Who does it notify? How? I been beginning blocks. I A have a bunch of lights. Other than the card things ha sets, I can't do anything with them. THAT'S BEGINNER. Set some parameters on the beginning of your video. "you should know this" etc. Link to those. I'm soooo lost I don't even know what to look for.
I understand that, except your choosing to omit a key point. It says "a beginner's guide to templates" - not "a beginner's guide to home assistant". These are two very clear distinctions that your choosing to ignore. I want to help you of course, but I'm just saying be mindful of the video title and temper your expectations. If you need help then join the discord, we have lots of great people to help out!
That's OK no problem, I understand your frustration. If you need help please ask, we have a large discord community of people who all help each other, feel free to join!
Bravo, you made the not so obvious much more understandable and brought it into view, keep up the great work. The explanation of the Jinga syntax and the zooming in on the text is appropriate, too.
Sorry this ended up being WAY longer than I anticipated and bit more of a raw format than usual but hope it's useful for you, now get out there and template! 👊
Dont worry! Home Assistant fans are not attention-challenged like squirrels or teenagers! Good job, thanks!
It really was helpful.
Gonna template a lot 😁
Hello! :D
Do you know if i can create an automation or some sort of switch, that edits a .yaml when i toggle it? Thank you!
Hello! Hmm I'm not sure to be honest, sounds complicated!!
@@EverythingSmartHome What i want to do is hide a tab under a password... I created a dummy alarm, added an alarm card, and an automation that detects when the dummy alarm is disarmed, and then shows the "secret panel". That's a lie, i haven't done that, i just want to. lol
This was one of the most useful Home Assistant tutorials I've ever seen. Been trying to understand templates for a long time.
Thanks Peter!
Templates are tricky. Best explanation i've seen on the subject. Thank you for taking the time.
Thanks, appreciate your support!
This by far the most useful home assistant video for a long time. The Templates have given me and others terrible headaches over the past. This was SO great to see how you in 26 minutes could explain it so simple. I have personally been beaten up when asking about templates in the HA discord support channel. A very unpolite forum
Hello! Thank you very much! Glad you found it useful! Sorry to hear about that on Discord, please do feel free to join our discord, we have an amazing bunch of guys who all help out and of course I spend lots of time there too!
Perfect timing! Literally just trying to work out what they are and how to use them and boom, I get your notification from RUclips 👍
Mind reading abilities 😳😂
Nice work, this is a complex subject, I hope you continue with this topic and get to intermediate and advanced as well.
Thanks Jose! If you have any requests for more advanced ones let me know!
This video saved me a ton of headache and time. Thank you so very much!
I wanted an easy way to lump all my door sensors (states) into a single template that I could copy/paste into different automations and after just 7 minutes of the above video I had all the answers I needed to make it happen. Super straight forward tutorial, thank you!
Thank you for this very clear video !
I will make a video for my French viewers and your the only one who explain for the very beginners
The most easy to understand video regarding templates in Home Assistant. Great job, you are the best !!!!
Thanks my friend!
I’ve been templating in HA pretty heavily, but I’ve never seen a tutorial on it yet. Thanks a lot for showing me the basics which I apparently still didn’t understand (i.e. difference between ‘{{‘ and ‘{%’ ) and also showing me something new and that’s setting a parameter of a new binary_sensor. Very usefull. Thanks once again!
Thanks Pavol, glad it was useful! You can use it for all domains, binary sensors, sensors, lights, switches so definitely useful to know! 👌
There are good HomeAssitant yaml videos out there but you're right this the best "templating" video I think. Reasonably short but gives good core knowledge.
Also I need to thank him for telling me the difference between False and false. One is a statement the other an input boolean. I would have never noticed that!
Hi!
I absolutely don’t regret it getting longer! I look forward to next Tuesday! 😄
Thank you friend, appreciate it! There might be a little break in TTT for a while but we shall see 😅
@@EverythingSmartHome I hope the break won't be too long! I became addicted !!! 😊
Finally I started to understand templates in Home Assistant - the documentation was mythical to me. Thank you!
Subscribed immediately ;)
Thanks Sven, glad it was useful!
I thoroughly enjoy learning how to fully utilize the home assistant platform from your videos. Thank you very much for all your time and effort!
Awesome, glad you enjoyed them!
I stumbled on your channel and I just wanted to thank you for everything that you do. It has greatly helped me. Thank you!
This video was fantastic, i now get how to read code with if and for loops. Explaining the syntax was super helpful. please don't stop making these videos.
Thanks TJ glad it was useful!
Lewis, this is indeed your best video from my perspective. Two months after watching this video, I have become a power user of template editor and using templates in scripts, automation & integrations. It is really a cool, elegant and very powerful concept once you grasp the fundamentals of it - thanks for explaining it so clearly!!
Thank you sir, appreciate you saying that!
Excellent video, one of the positive outcome is that I have started to use template editor a lot more!!
Haha nice!
WoW!
Great lesson.
Calm and methodical, you got what we beginners need
to be able to get templates with all magic {%%}
And you repeated this a lot, repetition is the mother of learning!
Very well done.
Thank you very much!
Thanks for the kind words, glad it was useful!
I think I remember promising to check you out in a reddit sub; watched once and subbed. Been watching ever since. Congrats on 10k!! Please don't worry about the extra time on videos that deserve the time. Would LOVE to see you do more on this subject as well as one on MQTT; a subject I never quite seem to understand as well as I would like.
Thanks Robert, very much appreciate your support! I'll try and get to that hopefully one day soon!
Brilliant Video, just what we needed after the Image Processing vid... Not really touched templates so that give me just what I needed. Keep up the great work !!
Thanks Paul, appreciate your support! Let me know how it goes! 😅
Great video, I like this format and I don't mind the length of the video.
Very well presented. Now I feel confident I can create my own templates and even new sensors. 👍
That is great, thanks for your feedback and glad it was useful! Thanks for the support!
Aaaand there it was. The magician who finally allowed my mind to wrap around templates in HA. Thanks a bunch, you have saved me endless hours of scouring the internet.
Your guides are very helpful, enjoyable and well made. Good stuff :)
Thank you sir!
Nice job ! me fue muy útil, me encanta que la explicación vaya de la mano con la práctica eso facilita la comprensión del tema.
Nice job! It was very useful to me, I love that the explanation goes hand in hand with the practice that facilitates the understanding of the topic
A really useful and complete tutorial. It showed me exactly how to use the templates I created in my configuration.yaml.
Glad you found it useful, thanks for the comment!
Thank you! Finally, I actually understand what templates i HA really are and how useful they are :)
Glad I could help, thanks for commenting!
Great Vid. Just wish to clarify that:
{{ ... }} are to be used for Expressions (Basically a value that you want to print out)
{% ... %} to be used for Statements (When you use a bunch of expressions or other statements together to execute something... like if/else/loops)
Great work . Thank you for sharing and making knowledge available around the globe
Thanks for watching!
Thanks a lot, by far the best video about templating
Thanks Thomas, glad it was useful!
Brilliant video once again - many thanks.
Thank you! That was incredibly digestible for someone just dipping his toe into Home Assistant!!!
Thank you for watching, glad it was useful!
Great video and a given addition to my Home Assistant Learning playlist👍🏻
Like you said, I think this is borderline to an advanced topic for people like me who are not developers or coders but very pedagogical so even I can follow but will have to practice a lot😊
Please consider making videos on how to create custom Lovelace cards to display all these new sensor attributes
Nice job! Templates have always seemed unnecessarily complex compared with just writing a few lines of python, but your interactive testing process and examples show it's straightforward once you know the syntax.
I'd love to see more of the technical yet powerful tutorials. Maybe a video building on this one about how to integrate a bunch of MQTT topics in to a single sensor with attributes would be useful to viewers? I presume that could be done in a similar way to this tutorial using templates and would make MQTT devices more equivalent with first-class sensors within Home Assistant.
A possible general example might be using one of the linux lm_sensors to MQTT scripts or IOT Link for Windows and displaying a graph of multiple sensors in Home Assistant?
Thank you! Yes it is all about knowing that syntax isn't it, but getting there can be difficult!
Thanks for your ideas, I'll certainly try to take them forward, I didn't think this video would be popular or I explained very well but seems people really enjoyed it so I'd be happy to add some more examples!
Great video again Lewis, thank you!
Thanks Rob! 👍
@@EverythingSmartHome still playing catch up... 😂
thanks man! very inspiring and educative the missing part for me!
That's great, glad I could help!
Lewis, I'm a huge fan of your channel. Thanks for everything you do for this community! That being said, your misuse of "statement" and "expression" in this video is driving me mad. You swapped them ;)
I knew I was getting attributes in a way the was suboptimal. Thanks! I know this was just an example but when you rounded to 2 places, multiplied by 100, and didn't change the float to an int that was killing me! 🤣
According to HA Templates, this refers to legacy configuration. Do you have or intend to do an updated tuition on templates? I'm struggling to assign an area to binary_sensor. cheers
Excellent tutorial, thanks
Thanks so much for taking time to do these tutorials. Nicely done and explained well!... Now a question on your use case with presence detection based on license plates... How would you detect if its coming home or leaving? - Wouldnt it pick up the licenses plate and set it to home - if its leaving in this scenario? - How could you solve that problem? ... Anyways - Thanks again!
Something like, if already home, assume leaving, if already away, assume arriving??? I haven't a clue how you'd do that via templates though, they're still very much a black art afaic, until I try using them more.
@@Tekwyzard That sounds like maybe the 'helpers' under configuration menu might help here (no pun intended). I believe helpers are basically variables you can set/update as needed?
@@slandshark Probably, yes. I use quite a few boolean 'helpers' for stuff myself, to set, remember or toggle states of various things, and some number inputs and other ' helper' whatnots for controlling when automations happen. As for doing the same using templates, the topic of this video, as I replied to the OP, I haven't a clue, apart from suggesting a possible work flow. I just flounder around trying out templatey stuff I find on the interweb, trying and often failing to adapt them to my needs, while usually spectacularly failing to come to terms with any of the obfuscatory syntax they use.
Great introduction, I learned a lot. But how do you set/assign a value to an entity state ? I have a value that I need for later calculations. How do i write a value to that entity.state, or is there another way of storeing values for later use ?
Hey Lewis, Ive been following your Mushroom dashboard tut, and noticed you used total lights on. How would I go about setting this up as I presume this is a template as well?
Great video, helped me a lot.
Excellent, thanks for the comment!
A suggestion for another video could be the Statistic and history-statistics. I actually wonder if it's possible to make groups of sensors (statistics from all my motion sensors) and extract statistics of the group entities so I don't I have to make a history stat for each one of them. But a video on how make statistics based on things like a motion sensor. Like time of last movement or total no. of movements today etc. would be great
Thank you for the suggestion!
What a timing, literally need this.
Coming in clutch 😂
Awesome as usual. Maybe another nice video like this would be Appdeamon.
Thanks! And thanks for the suggestion!
I saw you had toggle buttons in front of your automation, how do you do that?
The tool you use to edit your YAML file - what tool is that ?
It's visual studio code, available in the add-on store!
@@EverythingSmartHome Well, there is no "add-on" store in my HA core container installation......
Use it on your desktop then :)
@@EverythingSmartHome Great! How would you compare Visual Studio Code to i.e. NotePad++ and PilotEdit with focus on ease of use for newbees ?
PS - is there a way to set a default value to handle a reboot?
Templates is the key great video
Thanks my friend!
This is definitely a must read. Thank you so much, impossible to understand templates and the relationship with other HA components without the nice tutorial. However I'm having a little trouble. The action is a service rest_command to which I want to pass values that I get from the template. So how can I reference in the data section of the action a value that is retrieved by a template . I tried many flavours like (under the data section) status: {{test}} this triggers a validation trigger, I tried status: {{"test"}} that sends an empty string, I tried test, that sends the string "test". test is defined in the template section as: {% set test = states(''alarm_control_panel.5656_ccc_zone_4_alarm'')%}' The template works fine, it is tested in the developper section. Thanks again for your dedication to HA
Would it be possible to make a device_tracker assigned to a person and have it toggled with a boolean, using a template?
Amazing keep it up
Thank you, will do!
May I asked which affordable smart door lock can easily integrate with Home assistant? I have checked those DIY smart door locks videos on RUclips, but they are too difficult for me. Do you have any recommendations? Thank you!
Sorry I don't have any recommendations for you unfortunately, smart locks in the UK are a little more tricky than other countries so I don't have one yet!
@@EverythingSmartHome But do you have any ideas to DIY a smart lock?
How to use templates in a card (e.g. picture-element-card) to differ e.g. the color depending on a input_boolean?
Hi! how can i catch an specific portion of an Third party app notification on my android phone? i mean, i want to catch a notification from my IPTV app, but i comes with the current time, so i need only to catch the part that doesnt change, or a way to include the current time on the template.
I just waited to be the subscriber #10000 :D
Haha thanks Jorge!
I can't be the only that lol'd at 00:50 ...
Great video... tks a lot!!!
Please do a video on interfacing servo with esphome or tasmota on HomeAsisstant
Your videos are amazing !! Thanks a lot!!! I wonder if it would be possible to know which user flipped a switch. Is there a method to find out? If I have a Home assistant at home and we are three users, could we know who turned on or off a lamp? Thank in advance!!!
Thanks Dani! You should be able to look in the history log of a device which now in the more recent updates will show you who turn the lights on it off. Hope that helps!
@@EverythingSmartHome many thanks!! Do you know if it is possible to display the name of the person connected on a card? Example: welcome user XXX
Sorry I'm not sure!
@@EverythingSmartHome many thanks!!!
This was a wonderful video, thanks for all your efforts.
Hopefully a constructive suggestion, code is very hard to read, especially on a mobile. So every chance you have, can you please use the zoom.
Again thanks heaps.
Thanks, indeed I've tried to improve in the newer videos to make things readable
Thank you, for a HA noob lieke me this is really very helpful!
Thanks for watching!
Terrific!
Great video, question how do i print an attribute further down the list i.e. I want the id at the bottom
stations:
count: 9
cursor:
next: '8'
results:
- address:
country: US
line1: 7100 Hospital Dr
line2: ''
locality: Dublin
postalCode: '43017'
region: OH
fuels:
- regular_gas
- midgrade_gas
- premium_gas
- diesel
id: '140205'
Not everyone has a large screen. Reading this on a regular HD screen is a PITA. On top of that, tiny text in dark blue on a dark background is even harder to read. There are magnifier apps for streaming, or you could do it in Post.
You do a great job on your videos but unfortunately, none of the content on RUclips is relevant any longer because of the changes that have been made to HA. I am unable to get templates working because there is no content available for the current version of HA. Not even the HA documentation is up to date, so I am stuck.
I know I'm way too late for comments (2 months!), but your video will be helpful for ages!
Thanks!
In your tutorial you use specific statements, syntax etc. that make total sense in the specific examples, but for sure I will need to learn other of such elements to build my own templates.
Do you have any link for a cheatsheet or just an easy-to-understand list of the most useful elements in building templates?
I found links to the Jinja syntax in the Home Assistant docs, but that's too complex (for me). As my next step I'm looking for something in between your (excellent) beginners tutorial and the over-detailed explanations in the official documentation.
It's never too late to comment, I appreciate it!!
I don't unfortunately have a cheat sheet sorry I just the the Jinja2 syntax myself to search for what I'm trying to do, but that is a good idea!
Thanks, but still don't see how I turn this attribute into a usable variable in node red, do i just need to add to configure. yaml?
don't understand how I reformat from template test in developers to the the right format for config.yaml.
example {{state_attr('device_tracker.life360_myname','latitude')}}.
I want to access altitude as a variable in node red. Thanks in advance.
Node-Red is a seperate thing, sorry I don't use it!
@@EverythingSmartHome ok but question still same, how do I access the attribute, create template file, or just add to config.yaml. not clear. thanks
Thx!!!
Thanks Javi!
good one
Not sure if anyone said it before, but when programming in general if you're returning a boolean from an if statement, you don't need an if statement. Just return the condition directly - {{ state_attr('image_processing.whatever', 'statistics').calls_remaining > 2485 }}
I usually include it for completeness because this is a beginner guide and it's easier for beginners to understand if they see the full thing
@@EverythingSmartHome I can see how it would help beginners to see "true" and "false", but I don't think that's a great way to illustrate it. You'd be better off putting {{ 2 + 2 == 4 }} in the template editor and showing that "true" shows up in the results window.
The extra if statement is not more "complete", it's redundant.
@@EverythingSmartHome Also sorry to drop in and criticize you without saying nice things - this video is seriously helpful, thanks a ton for making it.
I didn't necessarily mean just the true/false but the if statement as a whole.
I'm not saying I'm right and your wrong or vice versa, I'm saying that if I put myself in the shoes of a beginner then for me personally it's easier to see the long way of having the if statement with true and false before moving to the shorthand way after. So that's why I wrote it like that, even if it is redundant.
I'm certainly no programmer either but all of the courses I've taken on different languages so far have all taught the long-hand way first in the beginner section before teaching the shorthand.
Just my opinion, again doesn't mean it's right
DOnt know if this exists but your loop MISSING breeak statement. Even if it finds something it will continue the loop while it ends, its not efficient. When finds it should stop looping - break the loop.
Great video! Even an idiot like me understands it 👍
Haha glad it helped Dave!
Please zoom in on the page when recording code, it’s not easy to see what you’re typing
awesome video!! haha you need to be careful I can see you still have a full head of hair seems like most HA videos is from bald people.
Haha I never noticed before! Well you know what's happened if I stop making videos suddenly 👀
Templates or ten plates?
A Like for that joke ;)
Haha thank you sir!
This is waaaaaaaay past beginner. Where are you getting all the language from? Where is this configuration file? OK , so it's on there - What then? Call service notify? What's that? Who does it notify? How?
I been beginning blocks. I A have a bunch of lights. Other than the card things ha sets, I can't do anything with them. THAT'S BEGINNER.
Set some parameters on the beginning of your video. "you should know this" etc. Link to those. I'm soooo lost I don't even know what to look for.
I understand that, except your choosing to omit a key point. It says "a beginner's guide to templates" - not "a beginner's guide to home assistant". These are two very clear distinctions that your choosing to ignore.
I want to help you of course, but I'm just saying be mindful of the video title and temper your expectations.
If you need help then join the discord, we have lots of great people to help out!
@@EverythingSmartHome thanks. Just trying to get through the weeds. You're right. Saw beginner. Assumed. I'll get there eventually.
That's OK no problem, I understand your frustration. If you need help please ask, we have a large discord community of people who all help each other, feel free to join!
Please for the love of god don't stop teaching.
Haha I'm not sure how much of a teacher I am but I'll try not to!
Bravo, you made the not so obvious much more understandable and brought it into view, keep up the great work. The explanation of the Jinga syntax and the zooming in on the text is appropriate, too.
Thanks my friend!