Templates in Home Assistant - what they are and how to use them!

  Рет қаралды 29,068

Will Surridge Tech

Will Surridge Tech

Күн бұрын

Пікірлер: 70
@jaap7374
@jaap7374 Жыл бұрын
Even after a few years, still the best explanation video on templating.
@MarkKoster
@MarkKoster 4 жыл бұрын
Never found a good video about templating untill now. Thanks man!
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Happy to help!
@1endell
@1endell 4 жыл бұрын
Thanks Buddy! With your help i can now extract the power, voltage and consuption from Sonoff POW R2
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Glad I could help
@1endell
@1endell 4 жыл бұрын
​ @Will Surridge Tech You always do, man! Thanks for sharing all of those clever ideas about automation. Cheers from Brazil
@WillSurridgeTech
@WillSurridgeTech 3 жыл бұрын
Thank you!
@rob1971
@rob1971 4 жыл бұрын
Another helpful video Will, and thanks for slowing the pace 👍🏻
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thanks for the feedback Rob! Glad it’s better! :)
@abwino
@abwino 3 жыл бұрын
Thank you for this explanation, helped me solve a problem I had been working on !
@WillSurridgeTech
@WillSurridgeTech 3 жыл бұрын
You're welcome!
@favaron
@favaron 4 жыл бұрын
Great video Will. Have subscribed. Looking forward to more videos. If you're up for topic suggestions - I'm curious about how to take my z wave and zigbee networks hooked on USB sticks and converting to an MQTT solution.
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thanks for the sub! I'm hopefully going to dive into zigbee at some point - but probably with the sonoff hub rather than a usb stick
@pashadavidson6808
@pashadavidson6808 4 жыл бұрын
Great video, Will! I've been hesitant about getting into templates, but this won me over.
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Glad I could help! Templates is the answer!
@leopold7562
@leopold7562 4 жыл бұрын
Interesting... I’ve not considered templates before, but the way you explained it here, I may just give them a go. I don’t sub lightly, but I’ve decided your content on the whole has been pretty useful, so you’ve earned a sub 👍
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Fab, glad I could help :)
@jasondion7587
@jasondion7587 4 жыл бұрын
This is great! Nice job! Going to go play with templates now.
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thank you! Good luck!
@PM13501
@PM13501 4 жыл бұрын
Will, well done...very elegantly explained!!
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thank you kindly!
@cryptno-g9473
@cryptno-g9473 4 жыл бұрын
excellent timing, just when i need to do this! thank you.
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
So glad I could help!
@DarthWuschel
@DarthWuschel 4 жыл бұрын
Thank you!!! Great Infos. This gave me the missing hint I needed to go further.
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Glad I could help :)
@chrisrosenkreuz23
@chrisrosenkreuz23 2 жыл бұрын
awesome stuff yo, cheers for your work
@WillSurridgeTech
@WillSurridgeTech 2 жыл бұрын
Much appreciated!
@joetrueman3555
@joetrueman3555 4 жыл бұрын
Interesting. Thank you, Will :)
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thanks Joe!
@frogeye22
@frogeye22 4 жыл бұрын
Great content - I've just subscribed! (just take one step back from the camera though please, I'm feeling a bit like my personal space is being invaded !)
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Haha, thank you for the sub!
@waynenocton
@waynenocton 3 жыл бұрын
This helped me a lot, but as usual I didn’t quite get it all right. I have a Shelly operating a garage door, but it doesn’t know the state, so if it’s open it closes, and if it’s closed, it opens. Separately I installed a 422mhz magnetic reed switch, and with the help of this video and links I got them grouped together. But one issue, the icon changes to yellow when the door is open, I’d like it to change to show and opened door. Anyone point me in the right direction?
@Cryptobob
@Cryptobob 4 жыл бұрын
Hi, great videos. Can you also make a video how to change a color icon when a certain value has reached? For example when a value is between 200 and 400 the icon must be red, otherwise green. I guess you have to install custom-ui??? Thanks man!
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Hi! If you check out this video I change the icon colour based on the state value using the custom button card - kzbin.info/www/bejne/nqDIh4iYhpWAack Let me know if you have any further questions!
@Cryptobob
@Cryptobob 4 жыл бұрын
Will Surridge Tech I will check it out, thanks!
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
no worries, hope it works!
@waynenocton
@waynenocton 2 жыл бұрын
Maybe this is simple and I just don’t get it when everyone else does, but what’s the difference between an entity and a device?
@docteurzoidberg
@docteurzoidberg 4 жыл бұрын
i found your channel. and i like it!
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thank you!
@DannyDM00
@DannyDM00 4 жыл бұрын
I like your enthousiasm :)
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thank you!
@davidwalker575
@davidwalker575 3 жыл бұрын
Thanks Will! Quick question, why is the value template is_state ...’on’ if all your trying to do is to show the state of the sensor?
@photelegy
@photelegy 2 жыл бұрын
How to use templates in a card (e.g. picture-element-card) to differ e.g. the color depending on a input_boolean?
@aakashrajput6309
@aakashrajput6309 3 жыл бұрын
Hi, Bro can you help me, I am trying to set esp32 as gateway for multiple sensor spread around my house... idea is to gateway(esp32) fetch data from all the sensors in its range, the problem is it is causing multiple entities to be created in home assistant
@dartfrogdk
@dartfrogdk 4 жыл бұрын
Well done
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thank you!
@Grrr2048
@Grrr2048 3 жыл бұрын
Hi Will, Great video with interesting content, Any chance you could help me with something ... I am trying to create an entity that calculates the number of days that have occurred since a date in the past i.e. between 2020-04-02 and now. any help will be appreciated.
@AdemKazkondu
@AdemKazkondu 3 жыл бұрын
I want to change the states in the Overview HOME and AWAY. I Want "AT Work" and not "HOME". I Use it in my Office. Is that possible with templates?
@WillSurridgeTech
@WillSurridgeTech 3 жыл бұрын
Check this out - www.home-assistant.io/integrations/template/#renaming-sensor-output
@SatsACart
@SatsACart 4 жыл бұрын
Great video Will and thanks for supporting me with my thermostat fan speed! It is working amazingly!
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
No problem 👍
@Shaq2k
@Shaq2k 4 жыл бұрын
Nice. But how do you actually use the templates for something?
@WillSurridgeTech
@WillSurridgeTech 3 жыл бұрын
It depends on what you're wanting to do - you just write the template to manipulate one value into another
@StePhanMckillen
@StePhanMckillen 4 жыл бұрын
10 out 10 bro like the lock template. Look like i be doing some reading thanks. Dont do the facebook thing so I just subscribe to you OK and hit the bell :)
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Fab thank you! Glad you like it!
@muslimpoonawala762
@muslimpoonawala762 3 жыл бұрын
Sir i am trying to animate my fan icon. i found the below code to add a template and one more code to add to lovelace. I want to know how to create the template for the first code button_card_templates: ceiling-fan-icon-settings: show_icon: true show_label: false show_name: false styles: card: - height: 36px - width: 50px grid: - grid-template-areas: '"i"' - grid-template-columnns: auto icon: - height: 26px - width: 26px state: - value: 'on' spin: true where do i enter the top code? the second code to add to lovelace is easy: - type: custom:button-card template: ceiling-fan-icon-settings entity: switch.24578876840d8e891ee7 tap_action: action: call-service service: switch.toggle service_data: entity_id: switch.24578876840d8e891ee7
@WillSurridgeTech
@WillSurridgeTech 3 жыл бұрын
Templates for lovelace cards are different to home assistant templates.If you are editing lovelace using the yaml, then the top code just needs to go into your ui-lovelace file
@michaelbatchelder
@michaelbatchelder 4 жыл бұрын
Apparently I need more research because nothing has worked thus far. Again copied what I thought would be relevant and got error "end of the stream or a document separator is expected at line 4, column 5:" Sensor.yaml - platform: template sensors: battery_voltage: friendly_name: 'Battery Voltage' value_template: "{{ ('sensor.tasmota_dht11_range' | float / 100 | round(2) )}}v" tested {{ ('sensor.tasmota_dht11_range' | float / 100 | round(2) )}}v in the Developer tools template section and no errors and showed what I was looking for, so you must need more to the file. your vids must be for the more advanced user, cause nothing has worked and I am suspecting I am leaving out something obvious to other users
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Hi Michael, if you could send me your code with pastebin on facebook I'll have a look and see what I can do - I'm trying to make my videos as accessible as possible :)
@michaelbatchelder
@michaelbatchelder 4 жыл бұрын
@@WillSurridgeTech my configuration.yaml is extremely basic, nothing in there except the includes. As for the sensor.yaml, you see it, the whole thing is listed above 5 lines of code starting from "- platform: template"... it is a direct copy and paste... Any help is extremely welcomed. Again, new setup.. I haven't even figured how to ssh into my pi, can't even use the login from pi itself, must be a default user created during install that is different from the one you use to see hassio GUI. I do get the sensor data via lovelace and I can use line 5 in the template test interface.
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
If you drop me a message on fb.com/WillSurridgeTech I will get back to you on there - much easier to have a conversation and try to figure out the problem than via comments :)
@heimdallmidgard4670
@heimdallmidgard4670 2 жыл бұрын
Or you just use a group for the persons.
@scubart
@scubart 4 жыл бұрын
Completely useless for beginners. 90% of the time a large talking head tells you WHAT is possible but now HOW to do it.
@WillSurridgeTech
@WillSurridgeTech 4 жыл бұрын
Thank you for your feedback. I’m more than happy to help you with any specific questions. In the description is a link to the code for the examples I made during the video which will hopefully clear things up.
@wangouthangout
@wangouthangout 3 жыл бұрын
Ok... But does this create a new sensor in lovelace? I can never find a new sensor created? Do I need to enable something?
@WillSurridgeTech
@WillSurridgeTech 3 жыл бұрын
This will create a new sensor (or whatever the template is) - you will be able to see it in the entities section of the supervisor tab; you can then add it to your lovelace however you usually edit it
Integrate Neos or Wyze Camera into Home Assistant, Control with MQTT
7:50
Will Surridge Tech
Рет қаралды 16 М.
Mastering Home Assistant Templates: A Beginner's Guide
23:56
SlackerLabs
Рет қаралды 52 М.
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
路飞与唐舞桐
Рет қаралды 28 МЛН
Worst flight ever
00:55
Adam W
Рет қаралды 45 МЛН
SHAPALAQ 6 серия / 3 часть #aminkavitaminka #aminak #aminokka #расулшоу
00:59
Аминка Витаминка
Рет қаралды 2,7 МЛН
Clamp Sensor Energy Monitoring - ESPHome in Home Assistant
13:03
Will Surridge Tech
Рет қаралды 47 М.
Home Assistant Templates - A Beginner's Guide
26:59
Everything Smart Home
Рет қаралды 112 М.
Home automation that's private and local?! (Home Assistant Yellow)
19:49
Home Assistant Templating Masterclass (Full Course)
46:18
Smart Home Makers
Рет қаралды 55 М.
The KEY To Thinking Like a Programmer (Fix This Or Keep Struggling)
10:39
Plug and Play WLED controllers
7:17
Home Automation Guy
Рет қаралды 19 М.
Home Assistant Concepts Explained Device, Entity, Service, Automation
14:03
Certificates from Scratch - X.509 Certificates explained
21:50
OneMarcFifty
Рет қаралды 115 М.
Master Home Assistant Templates: State Based Entities
38:39
SlackerLabs
Рет қаралды 31 М.
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
路飞与唐舞桐
Рет қаралды 28 МЛН