Build One Script to Rule Them All in home Assistant

Ғылым және технология

Let's be real.
When you start automating the boring stuff in your home, you find that a lot of the scenarios you want to automate are very similar. In Fact, I would guess that you have a lot of scripts, scenes, and automations that touch the are almost identical except you change the brightness of a light or the media player you use.
If you are not careful you will end up with a Home Assistant configuration that is 15k lines....like mine.
In this video, I will show you how you can tame that web of slightly different automations, scripts, and scenes, and replace them with a single dynamic script that can be reused in all situations.
So if you are looking for a more streamline approach to building your automations, looking for ways to reduce the size of your config, or simply wanting to find ways to make your home smarter, stick around because we are going to build dynamic scripts using Parameters.
Here are the video chapters:
00:00 - Build Dynamic Scripts in Home Assistant - Intro
01:14 - What do you mean, Parameters?
01:55 - Build One Home Assistant Script to Rule Them All
06:54 - Use Parameters to makeHome Assistant Smarter
10:30 - Wrapping it Up
Links to things in the video:
Using Helpers in Home Assistant: • Using Helpers in Home ...
Who am I?
My Name is Jeff. I am an Automator of boring things and a huge Home Assistant fan. I also live in a house that tweets.
Follow Me:
Github - github.com/thejeffreystone
Twitter - / thejeffreystone / / slackerlabs
On the Web - slacker-labs.com/
And if you like this video you could always fuel my coffee/automation habit - www.buymeacoffee.com/icE6DeBut,
or use my Amazon affiliate link ( www.amazon.com/s/ref=as_li_ss...) which helps support this content. The affiliate link provides a small commission on things you buy without additional cost to you.
If you want to follow my house on Twitter, you can at / anchoragehouse2 but be warned....it can be snarky.
Home Assistant Gear:
Amazon Affiliate Links): a.co/cR4BZHP
Video Gear used to make this content (affiliate links):
Canon m50: amzn.to/39zkz1p
Mic: amzn.to/3r73dPd
Dazzne D50 (Key Light): amzn.to/3oGBK5y
Music - Epidemic Sound - For those wanting cool audio for their videos (Affiliate Links): [www.epidemicsound.com/referra...]

Пікірлер: 33

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

    2 Years late, but the phrase would be "passing variables as parameters". You are essentially correct.

  • @SmartHomeJunkie
    @SmartHomeJunkie2 жыл бұрын

    Great, I wasn't aware of using parameters. I always used helpers for that. Learned something! Thanks.

  • @thecoolben
    @thecoolben2 жыл бұрын

    Knowledge + simplicity + dry humor and snarky comments = new subscriber! Great stuff, and I can't wait to dive into your other videos! Good luck with all the wayward digital assistants!

  • @joelfrojmowicz
    @joelfrojmowicz3 жыл бұрын

    Great video. Amazing channel. Keep up the good work!

  • @KaidoKurrikoff
    @KaidoKurrikoff3 жыл бұрын

    Great explanation and examples!

  • @RookieRay
    @RookieRay2 жыл бұрын

    This was really useful thank you

  • @wb2pcv
    @wb2pcv3 жыл бұрын

    Never heard of jinja, but would love to know more (not a programmer.) Thanks for your teaching heart!

  • @DaManOommen
    @DaManOommen2 жыл бұрын

    Thanks so much for all the videos you have put out. I have learned so much about home assistant from those. I am not an expert programmer but I'm very comfortable with it and I love coding, especially in yaml or js. But jinja templates is so new to me and I get tripped up on the syntax almost always and even using the excellent template test tool under developer tools. So I would love a video explaining in detail about jinja templates, please don't just be focused on basic stuff, I would love as much detail as you can provide. Thanks again.

  • @SlackerLabs

    @SlackerLabs

    2 жыл бұрын

    Right on. I've been tinkering with an idea on doing jinja video.

  • @hartleyelectricalcontracto2537
    @hartleyelectricalcontracto25373 жыл бұрын

    I really like the way you explain your content, it is really easy to follow along. I have a basic grasp of jinja2 templating but would be really interested in what other's have managed to do with it, there doesn't seem to be many comprehensive guides to using jinja in home assistant on KZread.

  • @SlackerLabs

    @SlackerLabs

    3 жыл бұрын

    Thanks for the feedback! I will work on a jinja video. I use it a lot and think it can really add to the setup without much work.

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

    Awesome. Please gibe us more about Ginger.

  • @SterileStreaming
    @SterileStreaming2 жыл бұрын

    I would love to see how you setup your text notifications.

  • @matejfoltyn
    @matejfoltyn3 жыл бұрын

    Hey, I just wanted to say that even though your videos are very interesting, we see a big transition to GUI implementations and/or blueprints. It will be much easier for us to follow without the code :) I get that this approach has its benefits but is more difficult for us noobs ;)

  • @SlackerLabs

    @SlackerLabs

    3 жыл бұрын

    Yea totally. I try to include the gui piece when I can.

  • @rasbe6863
    @rasbe68633 жыл бұрын

    Another great video Jeff. I am very interested in a video on using Amazon Polly.

  • @SlackerLabs

    @SlackerLabs

    3 жыл бұрын

    Thanks. Yea. I’ve been working on that video script off and on for a couple of months. It’s getting closer though.

  • @rasbe6863

    @rasbe6863

    3 жыл бұрын

    @@SlackerLabs looking forward to it. Time to play with the big boys with my notifications

  • @joshuastilwell1400
    @joshuastilwell14002 жыл бұрын

    Excellent video, but I missed the info on how exactly you coded the step by step increase in lighting.

  • @SlackerLabs

    @SlackerLabs

    2 жыл бұрын

    Yeah, I didn't cover that part in this one. But in my video on helpers, I talk about how I handle the automating the light transition using the master lights with level script. Although I got through it pretty fast. So I am not sure it is all that step by step. kzread.info/dash/bejne/fKR3k5WmfNjPgco.html But if you have questions let me know and I can see about breaking it down further.

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

    So much info, so little time. Great video. I really want some inexpensive little audio players. Something to play audio notifications. I refuse to buy any google/alexa smart (spying) devices. If I could setup without having to provide account info to register, sure. The just kill the mic. Bad enough with the smart phones. I also don't care to speak out commands. Just me.

  • @MikeWills1256
    @MikeWills12562 жыл бұрын

    Love the video so far, but totally unrelated question that sprung up when you showed the Master Bedroom automation- how did you get the lux value from the Aqara motion sensor into HA? As far as I can tell it doesn't pull via the Homekit integration

  • @SlackerLabs

    @SlackerLabs

    2 жыл бұрын

    Using the Zigbee2Mqtt integration it just shows up as one of the attributes. Not sure if the other integrations dont open it up.

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

    So much to learn, so little time...

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

    Thank you for sharing. Did you think of adding LoRa to create automation for your garden for example?

  • @SlackerLabs

    @SlackerLabs

    3 жыл бұрын

    I have not even heard of LoRa until right now. But I do plan on adding some automation my garden this spring.

  • @scottk4370
    @scottk43703 жыл бұрын

    Thanks for the good videos. Shouldn't you also use before sunrise with after sunset as a condition? Would it not just stay true?

  • @SlackerLabs

    @SlackerLabs

    3 жыл бұрын

    You sure could. I tend to use that for outside lights. Inside since we are up until 10pm the sunrise and sunset option isn’t always ideal if you want the lights only coming on when you are “up.” Ideally I would have a solid way of knowing when everyone is up and then just use that. The time is a poor mans proxy. Lol.

  • 2 жыл бұрын

    I wanna be a jinja ninja. not a programmer, but I like to learn stuff,

  • @ayshasheppard788
    @ayshasheppard7882 жыл бұрын

    Are these not variables or is it handled differently?

  • @SlackerLabs

    @SlackerLabs

    2 жыл бұрын

    It is essentially variables. But not in the sense that they will stay in memory. They only live long enough to see the automation or script run.

  • @jstr7476
    @jstr74762 жыл бұрын

    After about 3 minutes you tell something usefull. Btw totally useless for starters. Show something simple and SHORT. You start with a script of about 400 lines.

Келесі