You Need Number Helpers in your Home Assistant setup

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ก.ค. 2024
  • Number Helpers can give you an easy way to modify your automations, templates sensors, and more from the dashboard, so if you are not using them already, check out three ways they can help you level up your Home Assistant setup.
    Code:
    YAML of Automation to change Volume on all media players using Helper: github.com/thejeffreystone/ho...
    YAML of using Helper in Room Presence for dynamic threshold: github.com/thejeffreystone/ho...
    YAML for Master Bedroom Custom Light Transition: github.com/thejeffreystone/ho...
    Chapters:
    00:00 - Intro to Using Number Helpers to modify Templates, Scripts, Automations, and more from a dashboard in Home Assistant
    00:50 - Use a Number Helper for master Volume Control in Home Assistant
    03:47 - Use a Number Helper to adjust a template sensor in Home Assistant
    06:01 - Create a custom light transition using a number helper in Home Assistant
    #homeassistant #tipsandtricks #numberhelpers
    Who am I?
    My Name is Jeff. I am an DIY-er and Automator of boring things. And, of course, a huge Home Assistant fan. Oh, I also live in a house that tweets.
    Follow Me:
    Github - github.com/thejeffreystone
    Twitter - / thejeffreystone / / slackerlabs
    On the Web - slacker-labs.com/
    Discord - / discord
    And if you like this video you could always fuel my automation habit -
    Grab SlackerLabs Merch: slackerlabsmerch.square.site
    One Time Donation:
    Paypal: www.paypal.com/paypalme/Slack...
    Cash App: $slackerlabs
    Buy me a coffee: www.buymeacoffee.com/icE6DeBut
    .
    Or use my Amazon affiliate link which provides a small commission on things you buy without additional cost to you - www.amazon.com/s/ref=as_li_ss...
    Video Gear:
    Canon m50: amzn.to/3ftldPH
    Desk Mic: amzn.to/3wkum40
    Camera Mic: amzn.to/3tXk1cp
    Newer 660: amzn.to/3fwwejd
    Dazzne D50: amzn.to/3oGBK5y
    Audio Interface: amzn.to/3u07chK
    Gimble: amzn.to/3ouKAoe
    Music - Epidemic Sound: www.epidemicsound.com/referra...
    Video Assets - LenoFx: i.refs.cc/CJXU6Da9?smile_ref=e...
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 45

  • @DJohnsonDC
    @DJohnsonDC ปีที่แล้ว +1

    Jeff, you're missing quotes at 5:25... The Jinja Ninjas are coming for you!

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว +3

      Oh for the love... good catch. Ugh I knew I was going to miss something on this one... Yeah, it should be
      states('input_number.presence_threashold') | float
      I'll get that updated and make sure to add a link to the github line for reference.

    • @gerryf7015
      @gerryf7015 ปีที่แล้ว

      Good to have you back.

    • @eriklundstedt9469
      @eriklundstedt9469 ปีที่แล้ว

      And this is the part of home assistant that I don't like
      I'm self taught in more than one programming language, but I still can't stand yaml, python or Jinja and I still don't have any idea on how to properly use it
      I would have loved if there was an option somewhere that lets hass read json data, or something like toml
      Even better would be if it ran on an actual programming or scripting language like lua(think neovim or wezterm in the Linux world) or JavaScript (node:red comes to mind)

  • @MarkGhali
    @MarkGhali ปีที่แล้ว

    Saw your notification and got pumped? I always learn something! Timers have been amazing since watching your video. Thank you Jeff

  • @lee-he3ey
    @lee-he3ey ปีที่แล้ว

    This is exactly what I was looking for.. I have zigbee plugs controlling oil radiators linked to Aqara temp sensors that work outside of my hive schedule. The temperature is a hardcoded number in a HA automation which required a manual change. Now I can add a slider on the dashboard.. Nice one Jeff.

  • @hilton650
    @hilton650 9 หลายเดือนก่อน

    Thanks so much for this video! I've been wrestling with how to access numeric helpers for my Halloween sound automations. I have a number of tracks on DFPlayer(Sound)/D1 mini (ESPHome) modules, and didn't want to write automations for each track. Your video got me straightened out in about 5 minutes!

  • @BroncoPatriot
    @BroncoPatriot ปีที่แล้ว +1

    Thanks to you on previous videos I moved to many helpers. Transitions, light timeouts for daytime, evening and sleep, door autolock and now will be using this for volumes. Definitely do a video on your helper scripts that are general purpose. Love to learn more!!

  •  ปีที่แล้ว +2

    While true, I'd have loved a blog more than a video :)

  • @andymok7945
    @andymok7945 ปีที่แล้ว

    Thanks

  • @MrPecky
    @MrPecky ปีที่แล้ว

    Dude, I have that t-shirt!

  • @chunkkingmann309
    @chunkkingmann309 ปีที่แล้ว

    Love your videos, too. Especially the Jarvis connections. In this one, at 5:33, I noticed you spelled "threashold" with an extra 'a' but the helper was "threshold" - does the difference in spelling cause issues? Don't fat fingers (like ours) cause issues? LOL.

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว +1

      Yeah it causes an issues. Dont be like me. haha. Weirdly enough HA didn't catch that one.

  • @mohsinmubarak3543
    @mohsinmubarak3543 ปีที่แล้ว

    Hi, Kindly suggest me alternate SBC for core of my smart home. I'm looking for SBC to install homebridge or homeassistant

  • @DonClassifieds
    @DonClassifieds 3 หลายเดือนก่อน

    I get required key not provided @ data['volume_level']. Got None when run automation ive made the helper please advise need help?

  • @technithusiast
    @technithusiast ปีที่แล้ว +1

    Have you tried automating with node-red? Though you could do really similar stuff with the jinja templates it would be interesting to see what you come up with since node red offers some unique flexibility

    • @steveswoodworking2504
      @steveswoodworking2504 ปีที่แล้ว +1

      I like Node Red too, I think because I'm a programmer, and it allows you to do all kinds of things.

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว +1

      It’s in my list of videos. I need to play around with it. The only thing that gives me pause is the interface.
      But I do think it would come in handy. Not sure I use it as my main automation engine thought.

  • @chrisdixon5241
    @chrisdixon5241 ปีที่แล้ว +1

    Hi Jeff, great video as always!
    Slightly confused that in the 3rd example you test for the value < 256 in your sequence, but your input helper max was set to 255, meaning that when you increment again at max brightness it won't increase and will never trip your stopping condition. Or did I misunderstand something?
    Either way I think the idea and way to use it is clear, thanks for your efforts to help us all get more out of our automations

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว

      Yea. I noticed that when I was screen recording. And had a moment of what they heck. I can tell you it works. Ha. But yea I need to do that better. Because yea, it needs to be explicit. I will replace it will less than 255.

    • @chrisdixon5241
      @chrisdixon5241 ปีที่แล้ว

      @@SlackerLabs Thanks for the feedback Jeff.
      Interesting to know it works!
      If I had to guess (and I don't but I'm going to anyway :)), this is probably an example of a race condition.
      The sequence tells HA to increment the value, which HA takes note of and then returns to running the sequence.
      HA now, on a separate thread (probably some main HA runner task) adds step to the current value.
      Now your sequence runs again, tests the value and finds it >= 256 and quits
      Now the HA main thread tests if value has passed max and caps it back to 255.
      If I'm right, the 3rd example could randomly fail in the future if a) the sequence is given more work to do after the increment b) your HA instance was moved to new hardware with a faster CPU, different multi processing logic (thread scheduling), etc c) the HA gods rewrite the code to make the increment logic atomic or perform the increment in a different way.
      Probably safest to align the sequence to match the number helper to be future proof

  • @3DKlim
    @3DKlim 10 หลายเดือนก่อน

    How can this be used to change the value of timers?

  • @Tare86K
    @Tare86K ปีที่แล้ว

    can i connect my homekit devices to homeassistant pls can you show me how
    i need to get all my homekit devices in to homeassistant so i can use homeassistant dashbord

  • @mrxmry3264
    @mrxmry3264 ปีที่แล้ว

    how did you learn all this? is there a tutorial somewhere?

  • @fibranijevidra
    @fibranijevidra 10 หลายเดือนก่อน

    That is all fine, but what when you wanna restore music volume level after TTS notification. Create scene works with my lights, but not with amazon echo devices. Thanks for the helpful videos.

    • @SlackerLabs
      @SlackerLabs  10 หลายเดือนก่อน

      No? I had mine working with the Echo I thought. I will have to go back and check.

  • @j-ry
    @j-ry ปีที่แล้ว

    And if there would be a way to just program these kind of things with say javascript, the automation would be much more clear in what it's doing & using variables, arrays, etc. would come as standard.

  • @MarkGhali
    @MarkGhali ปีที่แล้ว

    Jeff, do you have a video on just templating? I am trying to get into that and there is just so much to know. Seeing your presence template, I want that!

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว +1

      I thought I had, but I guess I don't. We need to do one of those.

    • @MarkGhali
      @MarkGhali ปีที่แล้ว

      @@SlackerLabs awesome! And there is a difference between Jinja templates and home assistant templates, correct?

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว +1

      Not really I don’t think. If you are making templates in Home Assistant I think you will end up using Jinja in some capacity. But I do think Home Assistant will understand any Jinja template. There might be some functions in Jinja that don’t work. But I think all the important ones do

    • @venjsystems
      @venjsystems ปีที่แล้ว +1

      I'll second this. I am starting to dive deeper into templating and find the HA documentation very frustrating to follow.

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว +2

      I finished a script on a template video today. Hopefully will film it tomorrow and have it Friday or Saturday

  • @OGKenG
    @OGKenG ปีที่แล้ว +1

    You misspelled "threshold"

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว +1

      Yep. I fixed it in the github version.

  • @ssmon3
    @ssmon3 ปีที่แล้ว

    I tried using a number helper, but I keep running into the same error, which I haven't been able to solve:
    Error: Message malformed: expected float for dictionary value @ data['condition'][0]['above']
    condition: numeric_state
    entity_id: input_number.temperatuur_morgen
    above: {{ states('input_number.outside_temperature_threshold') | float }}

    • @SlackerLabs
      @SlackerLabs  ปีที่แล้ว

      I need to check by I think you need to wrap that template that reads your numeric helper in double quotes.

    • @DJohnsonDC
      @DJohnsonDC ปีที่แล้ว

      You can't use a template there, and it isn't necessary. Just put the entity_id of the input number.
      condition: numeric_state
      entity_id: input_number.temperatuur_morgen
      above: input_number.outside_temperature_threshold