5 MUST HAVE SCRIPTS for Home Assistant (Coding Tutorial)

  Рет қаралды 45,495

Smart Home Makers

Smart Home Makers

Күн бұрын

★Smart Home Courses★: courses.leonardosmarthomemake...
Everyone needs to start using scripts! Don't miss my coding tutorial towards the end!
Blog Post: leonardosmarthomemakers.com/5...
★My Gear★
kit.co/smarthomemakers/gettin...
kit.co/smarthomemakers/how-to...
kit.co/smarthomemakers/conten...
★★Connect with me ★★
☕Coffee☕ www.buymeacoffee.com/natureboss
🌐Web🌐 leonardosmarthomemakers.com/b...
📘Facebook📘 / leonardosmarthomemakers
🐦Twitter🐦 / smarthomemaker2
#smarthomemakers #homeassistant #smartthome
★★ Contents ★★
00:00 - Scripts
00:51 - Notify All
02:07 - Broadcast All
02:29 - Alarm Broadcast
03:49 - Flashing Lights
04:32 - Party Mode
06:00 - Fading Lights (Coding Tutorial)
DISCLAIMER: This KZbin video description contain affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This allows us to continue to make videos like this.

Пікірлер: 82
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
I created a POLL on my channel (subscribe to see it) let me know which Script did you enjoy the most!
@makeitworktech
@makeitworktech 2 жыл бұрын
Great video, well explained!
@sebastianfreund
@sebastianfreund 2 жыл бұрын
Excellent! 👍👍👍 I’ve learned some useful tricks 😊 Many many thanks!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hi Sebastian! Glad it was helpful!
@ochjoo77
@ochjoo77 2 жыл бұрын
Subscribed! This is the kind of non noob level videos that are very hard to find for Home Assistant..Thank you!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Welcome to the channel!
@RobinDeBecker
@RobinDeBecker 2 жыл бұрын
A very usefull video. I will use two of them as soon as possible (broadcast and send message). I will save this video as next year I will install smart dimmable switches and the fading light will come in handy.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Robin!!
@Hootie811
@Hootie811 2 жыл бұрын
Thanks for these, they simplified my automations massively
@Hootie811
@Hootie811 2 жыл бұрын
Just a quick one, how would I add an extra field for the additional data parameter in notify? I added the extra field in the script, but how would I add a couple of different key: value items when making the call?
@sanjaybali4092
@sanjaybali4092 2 жыл бұрын
Love from India again. thank you for such a good tutorial always.... ❤️❤️❤️👍🏻
@PaulMorley1
@PaulMorley1 2 жыл бұрын
Thanks for the great content Gio. I created the fade_lights script and ran into a problem getting it to work before I realized I hadn't listened very well to your instructions. I hadn't created the input_number yet and therefore got an "unknown entity" error when trying to run it. After creating the 'brightness_level' input number under Configuration >Automations > Helpers, the script worked just fine. Thanks again!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Nice one Paul!
@DasgenSmartHome
@DasgenSmartHome 2 жыл бұрын
Thank you Paul! That was exactly what I was looking for! I also ran into this issue. Now it works like a charm!
@johnnynobels
@johnnynobels 2 жыл бұрын
Great video. Helps to understand yaml. Please provide more of this
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hi Johnny! Just published a new video :) let me know if it helps !
@Dorff_Meister
@Dorff_Meister 2 жыл бұрын
I'll be adopting the notify all script. Nice abstraction.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Dorff!
@marcohamacher2231
@marcohamacher2231 2 жыл бұрын
Great video! Need to watch it several times to get it all - I am new to Home Assistant ;-).
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Marko! Watch as many times you need
@mksmurff
@mksmurff 2 жыл бұрын
Great video thanks
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hi Danny! Glad you enjoyed it
@paulrichards8473
@paulrichards8473 2 жыл бұрын
Really great video. It's helped me fix something that I've ben trying to do for ages (I'm a relative newbie to HOME ASSISTANT and the concept of YAML). One thing that I'm stuck on is getting the repeat announcement to work by using the repeat / while functionality (2m50 secs into your video). I've tried it and it fails to repeat the message, I've changed It to repeat / until too and it still doesn't repeat.
@suburbannerd5586
@suburbannerd5586 2 жыл бұрын
Good to see things like scripts in practical use
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks appreciate it!
@gigglesmclovin
@gigglesmclovin 2 жыл бұрын
Awesome video. You are the best KZbinr I found for advanced HA coding. Would love to see more of this high level content - would really appreciate your input on global variables and making a ui select dropdown that gets its content from external api.... I am making a hydroponic setup and I want people to be able to share "recipes" for different setups that loads in parameters for control (ph, daily light, amount of nutrient, ideal temp and humidity etc) Your thoughts greatly appreciated.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks for the compliments! Would need to get my head around this project feel free to email me. Regardless, drop downs need to be snappy and at least cached locally!
@WoottonRivers
@WoottonRivers 2 жыл бұрын
Great video! I'd love to see more videos like this that explain scripting and templates
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Nice! Any subject in particular Geoff?
@WoottonRivers
@WoottonRivers 2 жыл бұрын
I'd like to see some general examples of using variables, passing variables into scripts, using variables as loop counters. Just basic programming techniques but using home assistant scripting. Thanks
@MrSupersidewinder
@MrSupersidewinder 2 жыл бұрын
I will use the broadcast script to send announcements to multiple media players!!! Thanks❣
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Awesome!
@KrispKiwi
@KrispKiwi Жыл бұрын
Is it possible to do a script where it automatically sends a TTS to a different media player based upon a state. I have a sensor detecting the last room with motion so this would be helpful rather than doing choose options on every single automation
@GeorgeGaiser
@GeorgeGaiser 2 жыл бұрын
Something went wrong... I copy pasted the script from your blog, changed the example to a dimmable light source in mi setup, discovered i had to make a number helper and did that which made the script run, yay. The thing is, when the dimming light reaches almost zero, it stops and stays on, there's no going to off state somehow yet when looking at the video and script it should go to state 0 at least but stays at state 1... Any thoughts on what's wrong?
@casper11go
@casper11go Жыл бұрын
I've whatched the video and copied the script but my light still doesn't fade, i'm using a wiz light, also when the light is off the script doesn't turn the light on, fading with custom automation (fading with the percentage in stead of brightness level does work). (getting some zigbee light soon maybe they will work i hope)
@wbthisisprivatethanks2140
@wbthisisprivatethanks2140 Жыл бұрын
Maybe put a video of how it looks ( the result... prehaps the lamp in the back above books
@SmartHomeMakers
@SmartHomeMakers Жыл бұрын
Thanks for the suggestion!
@AndrewD-gg4se
@AndrewD-gg4se 5 ай бұрын
How do you call the scripts and pass the variables?
@dmwaeschle
@dmwaeschle 2 жыл бұрын
Hey Gio, Great video it has helped me a lot. I do however have a question regarding video you made "how tho create a media dashboard" I watched the video and I was reading your blog. I'm unsure how to put HDMI inputs into the helper that I created. Can you provide me some guidance? The helper I created is "Toggle" is that correct? I did not see a "select" option.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks for your kind words! In the helper section I think it might be called dropdown, then you can add your options, hope this helps
@gzxto
@gzxto 2 жыл бұрын
Well done, very understandable explained. A type of tutorial I've not seen yet with other HA videos. Keep on going with such valuable content.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Thomas !
@carldawson9770
@carldawson9770 2 жыл бұрын
Great Videos, I am new to HA, and set up all my integrations without much fuss ( mainly Tuya) I have a tablet, but cannot find a way to automate power the unit to unit, any help would be appreciated ta
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hi Carl, what device is power the unit to unit? Which Tuya integration are you using, the official or local Tuya?
@davidjohnson2782
@davidjohnson2782 2 жыл бұрын
Your script for fading the lights can presumably only be called once at a time - for example having two automations to fade lights in different parts of the house based on different conditions; if they both fired with an overlap they would compete to set the input_number? Would it be possible to parameterise the target brightness level and the time over which to fade and track the current brightness without using an input_number?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
That is the right way of doing it! Wasn’t able to do it with the time I had. It would be great to improve the script
@fxkalyan
@fxkalyan 2 жыл бұрын
Very nice Tutorial. Which editor are you using ? Notepad++ or Atom ?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Atom! What about yourself ?
@fxkalyan
@fxkalyan 2 жыл бұрын
@@SmartHomeMakers Thank you. I use notepad++
@n.r.2258
@n.r.2258 2 жыл бұрын
Well explained …but how do you start a script from a button on you’re UI ?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Add a button! Then pick call service script.turn_on
@davidlangley833
@davidlangley833 2 жыл бұрын
The RGB coloration was driving crazy. I tried everything to get the right colour, e.g. a sunrise colour. I had to use a scene to kind of gauge the colour I wanted😀, but now I can enter it directly. Thank you
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Nice one David! Each light renders the colour a little bit different example hue vs Lidl bulbs are not the same even if I hard set the rgb colours
@Magiske-michaelDk
@Magiske-michaelDk 2 жыл бұрын
Where in the automation donyou define the {{title and massage }}
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
in service call pass data: title: value message: value
@teknoaran
@teknoaran 2 жыл бұрын
hello, it would be great if you post a definitive solution video for alexa and home assistant connection :(
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Are you struggling with it ?
@teknoaran
@teknoaran 2 жыл бұрын
@@SmartHomeMakers unfortunately :(, I installed with haaska but I couldn't get efficiency, the devices are disconnecting, not responding. If there is a solution, it would be greatly appreciated if you could share it.
@discodogge
@discodogge 2 жыл бұрын
First of all good video but why would you run a script to fade a light instead of using transition: (seconds you want the transition to take) under data:? In the service call. A little bit more explaining about your thoughts around where to use that script would be nice. Maybe you meant it as way fading a light when holding a button for example? As an advanced user myself I can see many different possibilities but it is always better to hear your actual thoughts on the thing instead of my assumptions. Looking at your videos to hear the difference in other peoples processes :)
@Cash8503
@Cash8503 2 жыл бұрын
Much easier tysm!!
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Hey Daniel! The short answer is that not all lights have the transition option :) It was a practical example to teach some concepts like repeat etc!
@discodogge
@discodogge 2 жыл бұрын
@@SmartHomeMakers okay dit not know that, thanks! yes, I understood that part, admittedly I watch the video as I yet have found a good use-case for scrips. but that is more a problem/great thing whit home assistant you can always do things 10 different ways :)
@Cash8503
@Cash8503 2 жыл бұрын
@@SmartHomeMakers Lol Ok thanks for the explanation
@dickvanwoudenberg2919
@dickvanwoudenberg2919 2 жыл бұрын
if i try the script broadcast All, i'll get only the error no extra keys allowed? :(
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Share your code down below!
@dickvanwoudenberg2919
@dickvanwoudenberg2919 2 жыл бұрын
@@SmartHomeMakers Here it is: alias: New Test description: '' trigger: - type: opened platform: device device_id: 5a3368a43ef91a2eaccafc3c798273f1 entity_id: binary_sensor.access_control_backdoor_access_control_window_door_is_open domain: binary_sensor condition: [] action: - service: script.broadcast_all_the_devices message: KEEP SMILING, it is still not working!!! mode: single I don't get the service data when i use call service script. When i'll put the line message below service in YAML, the error appears.
@boehserenkel
@boehserenkel 2 жыл бұрын
1. why don’t you just use notification groups?
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
wasn't aware of it :)
@JoseBerruezo
@JoseBerruezo 2 жыл бұрын
👍
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks Jose!
@rebe7800
@rebe7800 2 жыл бұрын
I'm going in the yaml mode???? Sorry I have to write it. THIS USELESS FOR STARTERS!! How do you get in YAML mode?? After 1:13 it's over for a starter. Looked further, only for experts. A tutorial is is a HOWTO!!! 2.5% viewers likes.
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Don’t feel sorry you are expressing your frustration which are mostly shared by others. What do you mean about the 2.5%? This videos has a 98% like vs dislike ratio. Agree isn’t a video for new starters. Imagine having to explain derivatives and starting from the basics of algebra. Would be complete but too long for the YT algorithm and the avg user’s attention
@jstr7476
@jstr7476 2 жыл бұрын
Useless for starters
@SmartHomeMakers
@SmartHomeMakers 2 жыл бұрын
Thanks for you feedback, what would be useful for new starters ?
@jstr7476
@jstr7476 2 жыл бұрын
@@SmartHomeMakers First some common general things what I see in several youtube video's. I see e.g. 7 display changes in 5 seconds. At the end I think what did you click to come there. I slow down the speed or repeat it several times. Slow down and tell EVERYTHING what you do. For a starter everything you do is NEW. Slow down with speaking. English is not the native languages for everyone, don't be in a hurry. Keep the examples short and simple. I didn't watch everything but I saw a script of you with more then 400 lines. That's to much, to long for a starter. E.g. When you tell how to get the light on, you don't have to tell to get it off. I have a Odroid-N2 with installed Home Assistant and I Sonoff USB Zigbee Plus dongle, did nothing yet with it. I have a lot of Tuya en Ewelink working devices. E.g. Tell how to get a zigbee sonoff switch working in Home Assistant. Remember the starter just installed Home Assistant, he/she don't know anything.
12 Home Assistant STEPS (Beginner to PRO)
15:40
Smart Home Makers
Рет қаралды 48 М.
Home Assistant Templating Masterclass (Full Course)
46:18
Smart Home Makers
Рет қаралды 54 М.
Получилось у Миланы?😂
00:13
ХАБИБ
Рет қаралды 6 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2,4 МЛН
ТЫ С ДРУГОМ В ДЕТСТВЕ😂#shorts
01:00
BATEK_OFFICIAL
Рет қаралды 6 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 10 МЛН
START Leveraging Loops NOW - Home Assistant Coding Tutorial (Templating)
12:48
Stop, Intel’s Already Dead! - AMD Ryzen 9600X & 9700X Review
13:47
Linus Tech Tips
Рет қаралды 1 МЛН
Home Assistant Scripts Hidden Feature!
9:24
SlackerLabs
Рет қаралды 15 М.
Mastering Scripts in Home Assistant: A Comprehensive Guide
14:00
Smart Home Junkie
Рет қаралды 39 М.
Home Assistant Concepts Explained Device, Entity, Service, Automation
14:03
5 Home Assistant Built-In Integrations You Probably Should be Using
12:45
5 INCREDIBLE Home Assistant Dashboards
9:47
Everything Smart Home
Рет қаралды 379 М.
Create your OWN Template Sensor with Home Assistant Coding Tutorial
13:30
Smart Home Makers
Рет қаралды 55 М.
Build One Script to Rule Them All in home Assistant
11:21
SlackerLabs
Рет қаралды 25 М.
MAGIC FINGER TRICK TUTORIAL 😱😳
0:11
Milaad K
Рет қаралды 16 МЛН
YouTube запретили
0:38
Макс Рэйн
Рет қаралды 951 М.
Невероятный челлендж
0:51
TanobobaShorts
Рет қаралды 2,7 МЛН