No video

Home Assistant Templates - A Beginner's Guide

Home Assistant Template's are a very powerful way of formatting and manipulating data but they can be a little confusing to get start with. In this video I'll show you how to get started with templates in Home Assistant and we will cover 3 examples of templates - Using a template to trigger an automation, using a template as a notification message and finally using a template to create your own sensors, switches, lights or any other domain that supports templates.
If you'd like to support me and future projects:
Patreon:
/ everythingsmarthome
Buy Me a Coffee:
www.buymeacoffee.com/EverySma...
Written Article:
everythingsmarthome.co.uk
EVERYWHERE YOU CAN FIND ME:
Everything Smart Home Community Discord:
/ discord
Twitter: / everysmarthome (@EverySmartHome)
Instagram: / everythingsmarthome
Facebook: / everythingsmarthomeoff...
#homeassistant #smarthome
________________________
Some of the links above are affiliate links, where I earn a small commission if you click on the link and purchase an item. You are not obligated to do so, but it does help fund these videos in hopes of bringing value to you!
0:00 - Intro
0:50 - What are templates?
3:07 - Where to test templates and how to start
6:41 - If statement example for automation Trigger
11:23 - For loop example for notification message
18:09 - Creating a template sensor with For & If combined
26:20 - Outro

Пікірлер: 166

  • @EverythingSmartHome
    @EverythingSmartHome3 жыл бұрын

    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! 👊

  • @casperheintzelmann3108

    @casperheintzelmann3108

    3 жыл бұрын

    Dont worry! Home Assistant fans are not attention-challenged like squirrels or teenagers! Good job, thanks!

  • @DoNotKillThePresiden

    @DoNotKillThePresiden

    3 жыл бұрын

    It really was helpful. Gonna template a lot 😁

  • @mateojbuteler8974

    @mateojbuteler8974

    3 жыл бұрын

    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!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Hello! Hmm I'm not sure to be honest, sounds complicated!!

  • @mateojbuteler8974

    @mateojbuteler8974

    3 жыл бұрын

    @@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

  • @slandshark
    @slandshark2 жыл бұрын

    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!

  • @pucbaldwin
    @pucbaldwin3 жыл бұрын

    This was one of the most useful Home Assistant tutorials I've ever seen. Been trying to understand templates for a long time.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Peter!

  • @tenelitebrains
    @tenelitebrains3 жыл бұрын

    Perfect timing! Literally just trying to work out what they are and how to use them and boom, I get your notification from KZread 👍

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Mind reading abilities 😳😂

  • @makernix
    @makernix10 ай бұрын

    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

  • @whanauof5
    @whanauof53 жыл бұрын

    Templates are tricky. Best explanation i've seen on the subject. Thank you for taking the time.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks, appreciate your support!

  • @buenology
    @buenology Жыл бұрын

    I stumbled on your channel and I just wanted to thank you for everything that you do. It has greatly helped me. Thank you!

  • @JoseBerruezo
    @JoseBerruezo3 жыл бұрын

    Nice work, this is a complex subject, I hope you continue with this topic and get to intermediate and advanced as well.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Jose! If you have any requests for more advanced ones let me know!

  • @gabioancea4769
    @gabioancea47692 жыл бұрын

    The most easy to understand video regarding templates in Home Assistant. Great job, you are the best !!!!

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Thanks my friend!

  • @MrNebukad64
    @MrNebukad643 жыл бұрын

    Finally I started to understand templates in Home Assistant - the documentation was mythical to me. Thank you! Subscribed immediately ;)

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Sven, glad it was useful!

  • @WiseInetellect
    @WiseInetellect2 жыл бұрын

    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!

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Awesome, glad you enjoyed them!

  • @GeneralTJP
    @GeneralTJP2 жыл бұрын

    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.

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Thanks TJ glad it was useful!

  • @hansnorling
    @hansnorling2 жыл бұрын

    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!

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Thanks for the kind words, glad it was useful!

  • @pavolholes
    @pavolholes3 жыл бұрын

    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!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Pavol, glad it was useful! You can use it for all domains, binary sensors, sensors, lights, switches so definitely useful to know! 👌

  • @jmr

    @jmr

    2 жыл бұрын

    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.

  • @dudefromkeene

    @dudefromkeene

    Жыл бұрын

    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!

  • @carlnakamura4861
    @carlnakamura48613 жыл бұрын

    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

  • @Dox-IOT
    @Dox-IOT3 жыл бұрын

    Hi! I absolutely don’t regret it getting longer! I look forward to next Tuesday! 😄

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thank you friend, appreciate it! There might be a little break in TTT for a while but we shall see 😅

  • @Dox-IOT

    @Dox-IOT

    3 жыл бұрын

    ​@@EverythingSmartHome I hope the break won't be too long! I became addicted !!! 😊

  • @gildaslefur2435
    @gildaslefur24353 жыл бұрын

    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. 👍

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    That is great, thanks for your feedback and glad it was useful! Thanks for the support!

  • @PM13501
    @PM135012 жыл бұрын

    Excellent video, one of the positive outcome is that I have started to use template editor a lot more!!

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Haha nice!

  • @RobertAnthonyPitera
    @RobertAnthonyPitera3 жыл бұрын

    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.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Robert, very much appreciate your support! I'll try and get to that hopefully one day soon!

  • @pratahsinnetamby
    @pratahsinnetamby2 жыл бұрын

    Brilliant video once again - many thanks.

  • @PaulMeredith
    @PaulMeredith3 жыл бұрын

    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 !!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Paul, appreciate your support! Let me know how it goes! 😅

  • @fredrik354
    @fredrik3542 жыл бұрын

    Your guides are very helpful, enjoyable and well made. Good stuff :)

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Thank you sir!

  • @alejandrolazaro3355
    @alejandrolazaro33552 жыл бұрын

    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

  • @prebenborg
    @prebenborg3 жыл бұрын

    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

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    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!

  • @ansomeBob
    @ansomeBob2 жыл бұрын

    Excellent tutorial, thanks

  • @liveartrainbow
    @liveartrainbow3 жыл бұрын

    Great work . Thank you for sharing and making knowledge available around the globe

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks for watching!

  • @kjelle392
    @kjelle3923 жыл бұрын

    Thank you! Finally, I actually understand what templates i HA really are and how useful they are :)

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Glad I could help, thanks for commenting!

  • @PM13501
    @PM135012 жыл бұрын

    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!!

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Thank you sir, appreciate you saying that!

  • @PhilipJonesPMJ
    @PhilipJonesPMJ2 жыл бұрын

    A really useful and complete tutorial. It showed me exactly how to use the templates I created in my configuration.yaml.

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Glad you found it useful, thanks for the comment!

  • @ntq1ty
    @ntq1ty3 жыл бұрын

    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?

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    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!

  • @gzxto
    @gzxto3 жыл бұрын

    Thanks a lot, by far the best video about templating

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Thomas, glad it was useful!

  • @rob1971
    @rob19713 жыл бұрын

    Great video again Lewis, thank you!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Rob! 👍

  • @rob1971

    @rob1971

    3 жыл бұрын

    @@EverythingSmartHome still playing catch up... 😂

  • @mpbianconi
    @mpbianconi Жыл бұрын

    Great video... tks a lot!!!

  • @brianmoulson5512
    @brianmoulson55122 жыл бұрын

    Great video, helped me a lot.

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Excellent, thanks for the comment!

  • @dickvanwoudenberg2919
    @dickvanwoudenberg29193 жыл бұрын

    i've never work with templates before in HA, but after this tutorial, I definitely want to try it.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    That is the highest compliment I could get, thank you and glad it was useful!

  • @realmisterkorea
    @realmisterkorea3 жыл бұрын

    Thank you! That was incredibly digestible for someone just dipping his toe into Home Assistant!!!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thank you for watching, glad it was useful!

  • @jmr
    @jmr2 жыл бұрын

    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! 🤣

  • @TheVictoire22
    @TheVictoire223 жыл бұрын

    thanks man! very inspiring and educative the missing part for me!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    That's great, glad I could help!

  • @remimetivier4395
    @remimetivier4395 Жыл бұрын

    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)

  • @DoNotKillThePresiden
    @DoNotKillThePresiden3 жыл бұрын

    Great video! Thank you 🙏

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thank you!

  • @Saw-IT
    @Saw-IT3 жыл бұрын

    good one

  • @arreak
    @arreak3 жыл бұрын

    What a timing, literally need this.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Coming in clutch 😂

  • @dartfrogdk
    @dartfrogdk3 жыл бұрын

    Amazing keep it up

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thank you, will do!

  • @prebenborg
    @prebenborg3 жыл бұрын

    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

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thank you for the suggestion!

  • @skynetnetworks
    @skynetnetworks3 жыл бұрын

    Templates is the key great video

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks my friend!

  • @bmhsk
    @bmhsk2 жыл бұрын

    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!

  • @Tekwyzard

    @Tekwyzard

    2 жыл бұрын

    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.

  • @slandshark

    @slandshark

    2 жыл бұрын

    @@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?

  • @Tekwyzard

    @Tekwyzard

    2 жыл бұрын

    @@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.

  • @Bonaur
    @Bonaur Жыл бұрын

    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 ?

  • @BallsworthBallsbury
    @BallsworthBallsbury Жыл бұрын

    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 ;)

  • @asbjborg
    @asbjborg Жыл бұрын

    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.

  • @trusky77
    @trusky773 жыл бұрын

    Thx!!!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks Javi!

  • @nicolasrabate991
    @nicolasrabate9912 жыл бұрын

    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

  • @heimdallmidgard4670
    @heimdallmidgard46703 жыл бұрын

    Awesome as usual. Maybe another nice video like this would be Appdeamon.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Thanks! And thanks for the suggestion!

  • @rajmohanjena109
    @rajmohanjena1093 жыл бұрын

    Please do a video on interfacing servo with esphome or tasmota on HomeAsisstant

  • @firebladejohnny
    @firebladejohnny Жыл бұрын

    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

  • @pjotrpottervogel1990
    @pjotrpottervogel19902 жыл бұрын

    Thank you, for a HA noob lieke me this is really very helpful!

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Thanks for watching!

  • @fearthesmeag
    @fearthesmeag9 ай бұрын

    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?

  • @DementedDog
    @DementedDog2 жыл бұрын

    PS - is there a way to set a default value to handle a reboot?

  • @laurentweisgerber3846
    @laurentweisgerber38468 ай бұрын

    I saw you had toggle buttons in front of your automation, how do you do that?

  • @clairerovic
    @clairerovic2 жыл бұрын

    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.

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Thanks, indeed I've tried to improve in the newer videos to make things readable

  • @fredrikjerneskog2133
    @fredrikjerneskog21332 жыл бұрын

    Would it be possible to make a device_tracker assigned to a person and have it toggled with a boolean, using a template?

  • @photelegy
    @photelegy2 жыл бұрын

    How to use templates in a card (e.g. picture-element-card) to differ e.g. the color depending on a input_boolean?

  • @jorgeanzolao
    @jorgeanzolao3 жыл бұрын

    I just waited to be the subscriber #10000 :D

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Haha thanks Jorge!

  • @chrisw1462
    @chrisw1462 Жыл бұрын

    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.

  • @wagnerfontes2
    @wagnerfontes23 жыл бұрын

    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.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    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!

  • @soloyopuedohacerlo
    @soloyopuedohacerlo2 жыл бұрын

    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.

  • @SlackerLabs
    @SlackerLabs3 жыл бұрын

    I can't be the only that lol'd at 00:50 ...

  • @louisviciedo
    @louisviciedo Жыл бұрын

    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'

  • @daniruiz2572
    @daniruiz25723 жыл бұрын

    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!!!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    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!

  • @daniruiz2572

    @daniruiz2572

    3 жыл бұрын

    @@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

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Sorry I'm not sure!

  • @daniruiz2572

    @daniruiz2572

    3 жыл бұрын

    @@EverythingSmartHome many thanks!!!

  • @user-zr7kz4vs7c
    @user-zr7kz4vs7c3 жыл бұрын

    May I asked which affordable smart door lock can easily integrate with Home assistant? I have checked those DIY smart door locks videos on KZread, but they are too difficult for me. Do you have any recommendations? Thank you!

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    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!

  • @user-zr7kz4vs7c

    @user-zr7kz4vs7c

    3 жыл бұрын

    @@EverythingSmartHome But do you have any ideas to DIY a smart lock?

  • @jamiecoates9891
    @jamiecoates98913 жыл бұрын

    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.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Node-Red is a seperate thing, sorry I don't use it!

  • @jamiecoates9891

    @jamiecoates9891

    3 жыл бұрын

    @@EverythingSmartHome ok but question still same, how do I access the attribute, create template file, or just add to config.yaml. not clear. thanks

  • @celeritas5k
    @celeritas5k Жыл бұрын

    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

    @EverythingSmartHome

    Жыл бұрын

    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

  • @celeritas5k

    @celeritas5k

    Жыл бұрын

    ​@@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.

  • @celeritas5k

    @celeritas5k

    Жыл бұрын

    @@EverythingSmartHome Also sorry to drop in and criticize you without saying nice things - this video is seriously helpful, thanks a ton for making it.

  • @EverythingSmartHome

    @EverythingSmartHome

    Жыл бұрын

    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

  • @metoo7587
    @metoo75873 жыл бұрын

    The tool you use to edit your YAML file - what tool is that ?

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    It's visual studio code, available in the add-on store!

  • @metoo7587

    @metoo7587

    3 жыл бұрын

    @@EverythingSmartHome Well, there is no "add-on" store in my HA core container installation......

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Use it on your desktop then :)

  • @metoo7587

    @metoo7587

    3 жыл бұрын

    @@EverythingSmartHome Great! How would you compare Visual Studio Code to i.e. NotePad++ and PilotEdit with focus on ease of use for newbees ?

  • @SayWhaaaaaaaaaaaaaaaaaaaaaaat
    @SayWhaaaaaaaaaaaaaaaaaaaaaaat Жыл бұрын

    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.

  • @daveclarke5085
    @daveclarke50853 жыл бұрын

    Great video! Even an idiot like me understands it 👍

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Haha glad it helped Dave!

  • @Diamonddrake
    @Diamonddrake2 жыл бұрын

    Please zoom in on the page when recording code, it’s not easy to see what you’re typing

  • @AverageAutomation
    @AverageAutomation3 жыл бұрын

    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.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Haha I never noticed before! Well you know what's happened if I stop making videos suddenly 👀

  • @dab42bridges80
    @dab42bridges802 жыл бұрын

    Templates or ten plates?

  • @andrescalapt_
    @andrescalapt_3 жыл бұрын

    A Like for that joke ;)

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    Haha thank you sir!

  • @sagetx
    @sagetx3 жыл бұрын

    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.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    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!

  • @sagetx

    @sagetx

    3 жыл бұрын

    @@EverythingSmartHome thanks. Just trying to get through the weeds. You're right. Saw beginner. Assumed. I'll get there eventually.

  • @EverythingSmartHome

    @EverythingSmartHome

    3 жыл бұрын

    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!

  • @sysparadox9998
    @sysparadox99982 жыл бұрын

    Please for the love of god don't stop teaching.

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Haha I'm not sure how much of a teacher I am but I'll try not to!

  • @bgable7707
    @bgable77072 жыл бұрын

    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.

  • @EverythingSmartHome

    @EverythingSmartHome

    2 жыл бұрын

    Thanks my friend!