I should have done this YEARS Ago - Using Variables in Automations

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

Using Variables in your Home Assistant Automations to make your Smart home Smarter
** Links **
Hive Mind Automation on KZread: / hivemindautomation
** Support the Channel**
Buy Me a Coffee: buymeacoffee.com/HiveMindAuto
** Find Hive Mind Automation on Social Media **
Twitter: / hivemindauto
Instagram: / hivemindautomation
Facebook: / hivemindautomation
** TIMESTAMPS **
00:00 Intro
00:57 Preface
03:34 Creating The Variable
05:52 Making it Useful
11:23 Automating Changing the Variable Value
14:47 Making the Lights React to changing the Brightness Value
22:29 Summary
** Helpful Links **
Home Assistant: www.home-assistant.io/
Raspberry Pi: www.raspberrypi.org/
Balena Etcher: www.balena.io/etcher/
Home Assistant for iOS: apple.co/34JATce
Home Assistant for Android: bit.ly/30VUsNh
** CREDITS **
Music: www.purple-planet.com

Пікірлер: 31

  • @Layklant
    @Layklant2 жыл бұрын

    Thank you for this video! Awesome! Keep them coming!

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    Thanks for the kind words and for watching. I hope I don't disappoint!

  • @martink9785
    @martink97853 жыл бұрын

    Very cool 👍 I've used the time helper to set light on and off times, but this is potentially extremely useful for some new parts of my application of the system. Thank you!

  • @HiveMindAutomation

    @HiveMindAutomation

    3 жыл бұрын

    Glad it was helpful! I'm planning to play with the time helper and other helpers soon too. I can see a lot of benefit to the time helper, especially if you wanted to use it as an "Alarm Clock" and set your wake up time based on different factors. i.e. Weekends you might set it to 8am instead of 6am during the week. I also have some Automations that I can tidy up using a time-helper, as I use Conditions based on Time of day for which light to perform actions on.... a deep rabbit-hole to go down indeed.

  • @wizdude
    @wizdude2 жыл бұрын

    Another variation/enhancement in your “getting a drink while watching television” would be to add an automation to set the brightness value based on the television being on, or something like an Apple TV or Plex running. You might want “nighttime” to be at midnight onwards but activate a lower brightness from 9pm onwards if the television is being used. The possibilities are endless. Thanks for the video. Great ideas to make things smarter. Cheers :-)

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    I hadn't thought of that, but yes. As you say the possibilities are endless.

  • @cam00001
    @cam000012 жыл бұрын

    Wow. I'm using a handful of sensors - motion, time, daylight, and prescence detection. This was amazingly informative. Thanks, I subscribed.

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    Glad it was helpful! Thanks for the Sub.

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

    I very much appreciate your video. For me, as a foreigner (writing from Italy) is a valuable thing your way to speak calm and clear, so easy to understand even without the need for captions. And, moreover, you explain in a perfect clear way the topic that I was looking for. I was looking for a way to use variables in my HA automation, as I'm used to do as a former sw engineer with many languages. Now I understand that I need to use "helpers" and some kind of yaml scripting in order to read and write helpers. You didn't cover the boolean variables (maybe the "toggle" helper?) topic in your video, I'll try to make some attempt by myself This is the problem that I'm trying to solve. There is a big wardrobe where I put a zigbee light and a zigbee pushbutton. The pushbutton generates three events: short push, long push, double push. A first automation toggles the light on trigger from the short push. A second automation turns off the light after 2 mins on trigger from the light on event. I would like to turn on a boolean variable on the long push, and use it as a condition to select between a short delay (2 mins) and a long one (10 mins). And I would like to turn on another boolean variable on the double push, and use it as a condition to inhibit the light auto-off. Thanks a lot for your video.

  • @HiveMindAutomation

    @HiveMindAutomation

    Жыл бұрын

    Thanks for the Kind Words. The4 "input Boolean" or now "Toggle" Helper sounds like exactly what you need, then you can just use the stat of that input boolean in your Conditions in your regular automations. I cover them briefly in kzread.info/dash/bejne/m5qb1ZmNgqu0crA.html

  • @simonburke6681
    @simonburke66812 жыл бұрын

    Thanks Stu, Happy New Year

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    Same to you! Thanks for watching

  • @CarlosRuiz-nx3vm
    @CarlosRuiz-nx3vm2 жыл бұрын

    Great video, thanks

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    Glad you liked it! Thanks for watching

  • @AndrewDanne
    @AndrewDanne3 жыл бұрын

    Great video. Excellent examples for very practical use. I'm attempting to get my head around templating and some more advanced features as I am attempting to understand how I can provide some of the administration-type functionality to a normal user. Eg: Allow a user to add/remove lights & switches to a group that can then be used for night lights that come on at sunset. I'll get there but it's challenging. Separation of User and Administrator type settings is a subject I am attempting to get a balance on.

  • @HiveMindAutomation

    @HiveMindAutomation

    3 жыл бұрын

    Templating can be tricky at the best of times. I'm planning to do a deeper dive on Templating soon.

  • @AndrewDanne

    @AndrewDanne

    3 жыл бұрын

    @@HiveMindAutomation That would be awesome. Im just digging into Jinja at the moment to understand the splitting of dictionarys.

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

    Great video, thanks! Subscribed :)

  • @HiveMindAutomation

    @HiveMindAutomation

    Жыл бұрын

    Thanks for the sub! Glad I could help

  • @ajueket
    @ajueket2 жыл бұрын

    Very helpful. Thank you. I setup an 'alert' for when my schlage deadbolt is jammed. Some lights go red. I wanted to turn those lights off only when the door is locked after being jammed. I was able to set a variable and check that variable before turning lights off.

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    Glad it helped

  • @SmartHomeMakers
    @SmartHomeMakers3 жыл бұрын

    Really powerful feature !

  • @HiveMindAutomation

    @HiveMindAutomation

    3 жыл бұрын

    It's pretty cool, and as someone who 'dabbles' in programming, it makes a lot of sense to be using that instead of an infinitely expanding number of automations.

  • @wizdude
    @wizdude2 жыл бұрын

    Today I learnt that you can use trigger id’s to combine two queries and two actions in the same automation. You could redo your kitchen brightness daytime and nighttime into one single automation.

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    Great tip! Trigger ID's are relatively new and I've not played with them much.

  • @wizdude

    @wizdude

    2 жыл бұрын

    @@HiveMindAutomation they’ve added so much into the releases over the past 6 months. Stuff I had to use node red for years ago (slow increasing light intensity at sunrise to simulate the sun over a 20 minute time period) are now just standard automations in the current releases. I’m loving each new release now.

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

    Does anybody know how to use a input_number value as the 'below' field in a light level condition?

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    As far as I can tell you'll be looking at a YAML edit in the same way as demonstrated in the video. I'll see if I can dig up an example for you

  • @DementedDog

    @DementedDog

    2 жыл бұрын

    @@HiveMindAutomation thanks - I worked it out. Had an error in the template 😄

  • @rebe7800
    @rebe78002 жыл бұрын

    A lot of empty black and very small text. I's not easy to read. Remember alsmost none have such a big screen. And a very small cursor/pointer. Look to it on a 14 inch screen (e.g. at 11:16)! I'ts easier to follow if you change these things!!

  • @HiveMindAutomation

    @HiveMindAutomation

    2 жыл бұрын

    Thanks for the feedback and I'll take it into consideration

Келесі