I probably watched this a dozen times and finally got all three working! Thank you! I am now struggling with the next level, call the script, get the response_variable and now trying to call a script based on the value in the response_variable. If you want to do another video for this or help that would be awesome. example, response_variable returns the number of garage doors that are open. If none are open call script x and if one is open call script y etc... Thanks again.
@simonknight297311 ай бұрын
Finally the difference between scripts and automations is clear to me. Thank you. Going to try these custom fields out. I’ve mainly been using scripts when I want them to automatically get discovered as scenes in Alexa.
@SmartHomeJunkie11 ай бұрын
Awesome to hear!
@PosiCat4 ай бұрын
I was banging my head against scripts and return values, your video got my scripts working perfectly now thanks!
@videomichel11 ай бұрын
Your content made me re-engage with my home automation after getting accustomed to so many glitches and nuisances and things that 'should work better but eh, it is good enough'. Sorting all of these out one by one not only made me enjoy all the smart things I have more, it also increased the wife acceptance factor by miles. Thank you so much for your work.
@SmartHomeJunkie11 ай бұрын
That's great to hear! 👍🏻👍🏻
@ricardoramirez-ue5li9 ай бұрын
"Wife acceptance" is a fundamental variable in HA settings, lol
@TheBroz8 ай бұрын
Got my Home Assistant Green today and screwing about with notifications was one of the first things I did. Managed to setup a script to send a custom message to the phones and the living room TV. Early days but I’m already impressed with the power and flexibility of HA.
@SmartHomeJunkie8 ай бұрын
That's awesome to hear. Have fun with HA! It's a rabbithole, but also a lot of fun.
@alexkerin369111 ай бұрын
You really inspired me. I created a script that allows the automation creator to select which of the family phones the notification should go to, and whether it should be a critical notification. Much appreciated.
@SmartHomeJunkie11 ай бұрын
That's awesome to hear!
@jamesdavis-claydon852010 ай бұрын
Thank you for going slowly, if I watch this a few times, I should be able to understand enough to accomplish what I wanted to do, which is check my home temperature to see if is hot or cold. If it is hot which for me is above 25C, and I have been away and am now 15Km from home, send the RF code that turns my portable air conditioner on. If it's cold which for me is below -20C, set the thermostat to 23. I learn much better thru audio and video due to a brain injury.. Reading and typing takes a lot more effort
@SmartHomeJunkie10 ай бұрын
Thank you.
@christophhulsmann743011 ай бұрын
So I'm dizzy ;-), I translated first and will try the scripts and automations - Thanks! Once again you helped me a lot to understand more! "Get Notified And Respond Immediately Using Actionable Notifications in Home Assistant" was also a very good tutorial, I continue with “Mastering Scipts in Home Assistant”... greeting - Your work is simply great and important for understanding Home Assistant!
@SmartHomeJunkie11 ай бұрын
Thank you so much for your compliment! 🙏🏻
@emms-place2 ай бұрын
Thanks for this very informative tutorial on using scripts Ed. Cant wait to see what I can come up with in my setup
@PontusWelin11 ай бұрын
Very helpful! I had an issue where this would have helped just this past week. I had notifications in my automations set to the wrong phone. Thanks!
@SmartHomeJunkie11 ай бұрын
Great to hear that it helps!
@esenterre4 ай бұрын
You made simple explanations, easy to follow. Now it's time to see if I can make it work! Thanks!
@thehostler04 ай бұрын
The saddest part about this is going back into all of the automations and swapping out the phone notifications actions for the script. Thanks, this helped me understand scripts much better.
@SmartHomeJunkie11 ай бұрын
Be a Scripts pro in Home Assistant! Learn about using Fields and Response variables in Scripts in Home Assistant and let me know what advanced scripts you can think of! ⭐See the description of this video for all the links to other tutorials and sponsoring options! ⭐
@johnnynobels11 ай бұрын
Thank you for this vety usefull tutorial. I didnt not know using parameters in scripts was that easy.
@SmartHomeJunkie11 ай бұрын
Glad it was helpful!
@johnnynobels11 ай бұрын
@@SmartHomeJunkie , I tried to use parameters right away but noticed I did not have this option in my HA configuration. I found out you must have version 2023.11 installed. Perhaps also important for others who want to try.
@BeardedTinker11 ай бұрын
Great video as per usual!!! Keep them coming.
@SmartHomeJunkie11 ай бұрын
Thank you Andrej! You're the best!
@Rob_6511 ай бұрын
I do have to play with this on my system. It's time to do more than just switching lights and other equipment on and off 😀
@robhoogland0111 ай бұрын
Great video. Good explanation. I will be going to use this for sure. Thanks, Ed.
@SmartHomeJunkie11 ай бұрын
Thank you for your kind words. This keeps me going! 🙏🏻
@GregGranito7 ай бұрын
This is so great. As someone who just had to update many many automations when I got a new phone, the script template is fantastic. One question: Any idea how we could add actionable notifications via the script with fields?
@hillstreesandstreams10 ай бұрын
Fab, thank you. Used the phone notification script in 3 of my automations already. Great tips and I'm off to watch som more vidoes.
@SmartHomeJunkie10 ай бұрын
Looks like you're on a roll with those automations! Don't forget to take breaks and grab some popcorn before diving into more videos.
@EsotericArctos11 ай бұрын
A lot of stuff scripts do can also be done in scenes now. I am not really sure about needing both scripts and scenes in Home Assistant. They use to be quite different, but these days they are quite similar. I use scripts a lot because this is how I use to do all my scenes, because the scenes feature use to be really rubbish back in 2018 when I first got serious with Home Assistant. Scripts are definitely handy, much better than having super complex automations with so much code beign repeated. My first script was a "night mode" script, which triggered at bed time to lock doors and turn off lights.
@bertrandmauge983211 ай бұрын
Tks a lot for your help / tuto, you inspired me a lot. I'm a beginner and of course I'm stuck on the more advance user. I have try to adapted the script to the fire alarm: I've got a few of them (zwave and zigbee) and I would like to get the information on my phone of which one is active. And, of course, I will then use it for the leak sensor as well. Also, tks for the idea of the script for the phone: I'm getting more and more automatisations and you help me to realised how helpfull it would to change only one script for a new phone.
@SmartHomeJunkie11 ай бұрын
That's great to hear. Thank you for responding! 🙏🏻
@kindred275 ай бұрын
This video helped me to look closer for typos in my script. I was 100% sure I had written everything correctly but I got no variable sent to my phone. Only : The weather is ......... and nothing. Went back to the script an saw an typo variables: weatcher_condition: Still did not get anything sent to my phone and then I saw the other typo response_variable: weather_codition Slow an steady I guess. Thank you for sharing examples.
@alexicna9211 ай бұрын
Great video again ! So useful ! Thanks a lot.
@SmartHomeJunkie11 ай бұрын
Thank you for the compliment.
@MrNetworkG11 ай бұрын
Great video, more videos like this. Thank you, sir!
@tgf2004nl11 ай бұрын
Briljante video weer, daar heb ik echt wat aan 🙂
@SmartHomeJunkie11 ай бұрын
Thx!
@MikaCinema3411 ай бұрын
Thank you very much for your high-quality videos. I have a question; my mother has fallen several times in the house, and I'm thinking of installing Home Assistant with a video camera. However, do you know if there is a plugin available to monitor her vital signs (such as heart rate and blood pressure) and, MOST importantly, a fall detector so that I can quickly intervene? Thank you.
@SmartHomeJunkie11 ай бұрын
Thanks! I believe the Aqara FP2 has human fall detection. I did not test that feature though.
@adamg34029 ай бұрын
Dziękujemy.
@sevagjb11 ай бұрын
Thanks Ed let say this is lesson 1 i will wait the lesson 2 🥰
@SmartHomeJunkie11 ай бұрын
What do you mean?
@sevagjb11 ай бұрын
I mean, this is wonderful tutorial and I hope we can get more like this @@SmartHomeJunkie
@janiguzhuni34909 ай бұрын
Very nice 👌 How to create long press button dimming increase or decrease lights in home assistant in 1 single buton automation? Can you help me for this 😅
@squalazzo11 ай бұрын
great content as always, thanks!
@SmartHomeJunkie11 ай бұрын
Glad you enjoyed it!
@Superawesomeduckface11 ай бұрын
This is so helpful to simplify all of my notification automations! Any suggestions on how to add a field for adding actions to the script? A lot of mine have an action and it would be greatto add a YAML field.
@durtoffmyshoulda9 ай бұрын
I'm sure this formatting won't come across here correctly..but I viewed my action notification in YAML and then copied it to this script and it worked well! It looks like you might need a separate script for an action that won't change. Here is what mine looks like message: "{{message}}" title: "{{title}}" data: actions: - action: URI title: Open Unifi Protect uri: app://com.ubnt.unifi.protect
@JohanVromans11 ай бұрын
Good job (again)!
@SmartHomeJunkie11 ай бұрын
Thank you! 🙏🏻🙏🏻🙏🏻
@Mr-Coke9 ай бұрын
i have bought me the S3 lite. But the voice is really low and you cant set it louder. How is this with the S3 Box? Can you adjust there the volume? Or can we send the sound to an integrated speaker? So we only use the display microphone and the voice comes from speakers?
@DavidWhatfor11 ай бұрын
Use case for me was having multiple helper toggles changing at the same time :-) I use conditional cards a lot to free up dashboard space and only give relevant options and these rely on my helpers. On another note have you or anyone done a video on the different installation options and their Pros/Cons. I run a VM image but the HA instance is in a docker within that VM and I want to rebuild possibly in docker outside of that VM rather than on dedicated hardware because of the flexibility and not have to go through so many layers when it comes to USB devices i.e. Zigbee, Bluetooth, etc.
@Wimpieseigen11 ай бұрын
Thanks
@jfs4311 ай бұрын
Great lesson, this has got me thinking. However, I'm missing the 'Add Fields' option on my menu, why would that be?
@ZoomtronicBlogspot11 ай бұрын
I also have no add fields option
@SmartHomeJunkie11 ай бұрын
Are you using the latest version of Home Assistant?
@SmartHomeJunkie11 ай бұрын
It's a new feature since version 2023.11 of Home Assistant.
@jfs4311 ай бұрын
@@SmartHomeJunkie aha, thanks. I usually update in the middle of the month.
@SmartHomeJunkie11 ай бұрын
@@jfs43 No problem.
@RobertoMello7911 ай бұрын
Great video, as always :) When would you use Scripts instead of NodeRed?
@SmartHomeJunkie11 ай бұрын
Always 😉
@empewoow10 ай бұрын
Can you help me out? The Response variable field is not there when I use the visual editor. when I try the YAML editor, and add it manually, I get this error: Message malformed: extra keys not allowed @ data['sequence'][0]['response_variable']
@psylenced11 ай бұрын
One suggestion - you don't need to add 2 conditions to your "else if" because it's implied by the previous conditions. The only time you'd need to add both is if they were standalone "if" statements. so: If (temp < 5) elif (temp < 15) elif (temp < 20) elif (temp < 30) endif or: if (temp < 5) endif if (temp >= 5 and temp < 15) endif if (temp >= 15 and temp < 25) endif Also might help to add an "else" at the end - to handle the situation that temp is over 30.
@SmartHomeJunkie11 ай бұрын
Thanks. It's just an example... This video is not about how to create perfect template code, but on how to use scripts...
@davidfarrell10625 күн бұрын
Is it possible to add strings like these to a template like you create so information appears in the message. %device% , %value% , %text% , %time% , and %date% Other platforms used this approach but cant see it in home assistant. Dont want just prefilled text. Want to see the value and time etc.
@bgable77072 ай бұрын
Though, I have the HA "companion" app installed on my Android phone, after selecting the device that has the App installed, I never received a notification from it, hmm. Additionally the flow from Create New Script popup, next screen only displays Sequence: + Add action or + Add Building Block.
@serichard7 ай бұрын
So I'm working on a notification engine for my duplex with both sides involved was looking at the fields particulary the selector type field... It has the blank selector options, but for the love of god I can't find anything on how to setup a list to select between there.
@metoo75876 ай бұрын
A challenge when making such superior videos is that in less than a month, the video content often becomes obsolete because HA has changed so much, many of the screens (UI) and instructions are incorrect. In HA 2024.4.3 the Fields option has several new entries, like Selector Type, Selector Options etc. I tried to follow your video, but at the end I couldn't get it to combine the text with the condition variable (value). I only got the text coming out on my phone. I suspect that this might be related to the field selector option being set to Text.
@SmartHomeJunkie6 ай бұрын
It's a challenge indeed, but the functionality should still work because the YAML does not change.
@metoo75876 ай бұрын
@@SmartHomeJunkie Hi, I found my error. I had overlooked the piping symbol in the script. A small, but oh so important detail. 😶
@metoo75876 ай бұрын
@@SmartHomeJunkie Well, now I get "Error: Service response data expected a dictionary, was
@gumbypokey711 ай бұрын
Very informative but I think a big turn off for some users is going to be the need to jump into YAML at even the simplest of scripts. Even in the example of using fields in a notification service call required directly editing the YAML. Might be nice if the script editor UI got some love to help novice users.
@SmartHomeJunkie11 ай бұрын
There will be some modifications in the next release of HA already. But, YAML is not that difficult imho.
@pontuslandin68834 ай бұрын
It is awesome to see that there is so much left to learn in HA. It’s a deep hole 😂
@jamesdavis-claydon852010 ай бұрын
I followed all of the steps in the video, but I obviously missed something because when I toggle the dummy switch I get the following error : "Call-service error. TypeError: '
@SmartHomeJunkie10 ай бұрын
Yup. According to the error message you most likely made a mistake in your template code. You do have Openweathermap installed, right?
@syukrishahabuddin461811 ай бұрын
I would like to know if there’s a way to create a chatbox dashboard card for family members that are on my HA to use. I imagine i would need helper and scripts but don’t know how to go about it. Would appreciate a tutorial if available.
@SmartHomeJunkie11 ай бұрын
Interesting. Can you elaborate on your use case?
@syukrishahabuddin461811 ай бұрын
@@SmartHomeJunkie sure. 1. Experimenting on a localized on HA chat window between users/family members. 2. Maybe replicating the “refrigerator post its” in the home , for reminders, notes, to-dos. Would be a 5-10 line latest “messages/notes/inputs” that will be visible on the dashboard. Am struggling to find something similar to extrapolate.
@SmartHomeJunkie11 ай бұрын
@@syukrishahabuddin4618 I'm not aware of a chat functionality like this in HA.
@Dendee211 ай бұрын
What's the name of the panel in the back that says Please subscribe? Is it also connected to HA?
@SmartHomeJunkie11 ай бұрын
It's this one: This is the BEST MATRIX DISPLAY CLOCK for Home Assistant! kzbin.info/www/bejne/hGGxfIOAr6x7q6M
@Dendee211 ай бұрын
Thanks this is exactly what I was looking for the last few weeks 👍🏻
@SmartHomeJunkie11 ай бұрын
@@Dendee2 That is great to hear!
@Raymond.Jansen11 ай бұрын
Is it possible to also add the data field in the notify script? When I add a field data, and add it to the yaml section in the script, it doesn't work.
@SmartHomeJunkie11 ай бұрын
I'm not sure what you mean.
@Raymond.Jansen11 ай бұрын
@@SmartHomeJunkie When I select the notify service, I have 4 fields. Message, Title, Target and data. The message and title you explained in your video (thanks, works great). But for some automations I also use the data field in the notify service. Sometimes to add an image in the message, sometimes to make an actionable notification (select yes or no). But it doesn't just work if I add a field in the notify script (data) and add: data: "{{data}}" in the yaml code under action. It would be great if this could work, because then I could call the script allways. Makes it much easier when changing phones.
@SmartHomeJunkie11 ай бұрын
@@Raymond.Jansen Ah, now I understand what you mean. I didn't try this myself tbh. Maybe the issue is that the data field contains more complex yaml. I will experiment a bit with this.
@dennisschoenmakers571610 ай бұрын
@@SmartHomeJunkie That would be great, I'm trying that to. I've got an automation that sends me a message to my phone when traffic is piling up before I go to work with a link that shows me the map. I did change all the other notifications using scripts, that was a great tip, thanks again!
@Jcarlier5011 ай бұрын
Great video but ... do you have a video which explains the possibilities of the amazon players (echo**) I find this type of player very restrictive (no mp3 playback, no radio browser, not possible with chime tts etc) except perhaps with nabu casa. google player doesn't have all these problems
@SmartHomeJunkie11 ай бұрын
Unfortunately, I don't...
@metoo75876 ай бұрын
At least on my Samsung Galaxy S21+ these notifications doesn't show up anywhere before I unlock the phone - which makes it much less useful.
@SmartHomeJunkie6 ай бұрын
Might be a setting on your phone. 🤷🏼♂️
@RMyren11 ай бұрын
When I started watching this video, I did not understand what to use scripts for, and I still don't🤷♂️
@SmartHomeJunkie11 ай бұрын
You will overtime...
@RMyren11 ай бұрын
@SmartHomeJunkie I hope so. Your videos have helped me a lot, but they require that the watcher already know most of the basics, which I don't. Went from not having written a code in my life to a fully functioning HA setup in 3 weeks' time.
@gorgorgonzales309011 ай бұрын
Once you have over 50 automations, that do almost the same thing you will lern to love scripts 😅 I didn't understand what they were for in the beginning as well. But over time realized how much they help to keep everything clean and accessible, especially if switching devices later in your setup.. I just rebuilt my whole setup with using scripts and love how simple everything is now...
@SmartHomeJunkie11 ай бұрын
@@gorgorgonzales3090 Yes, you got it!!!
@FilipeNeto61611 ай бұрын
You will over the time. I use HA for almost two years, started automation only one year ago and I'm finally scratching scrips
@rickpoeling683111 ай бұрын
I followed along in the steps and after I saved it and set up the automation it fired (I went to the trace) and it showed the following instead of the {{message}} and {{title}} that I had entered. I tried again and when I go back into the script and view in yaml, it has replaced what I typed with the following: service: notify.mobile_app_sm_s908u data: message: "[object Object]": null title: "[object Object]": null
@SmartHomeJunkie11 ай бұрын
No idea why you see that. It doesn't show that behavior at my side. 🤷🏼♂️ I guess you did something different than what I show in the video. The script shouldn't show the sequence in the visual editor at all. It should show that you cannot view the action in the visual editor
@rickpoeling683111 ай бұрын
I see my mistake. I forgot to put those items in quotes. I can't believe I made that same mistake two times in a row. 😞
@SmartHomeJunkie11 ай бұрын
@@rickpoeling6831 I suspected this a bit already. Great that you found the solution!