You Need Number Helpers in your Home Assistant setup

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 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)

  • @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!!

  • @hilton650
    @hilton650 11 місяців тому

    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!

  • @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.

  •  Рік тому +2

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

  • @MarkGhali
    @MarkGhali Рік тому

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

  • @MrPecky
    @MrPecky Рік тому

    Dude, I have that t-shirt!

  • @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.

  • @andymok7945
    @andymok7945 Рік тому

    Thanks

  • @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

  • @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.

  • @DonClassifieds
    @DonClassifieds 5 місяців тому

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

  • @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

  • @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.

  • @3DKlim
    @3DKlim Рік тому

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

  • @fibranijevidra
    @fibranijevidra Рік тому

    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  Рік тому

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

  • @mohsinmubarak3543
    @mohsinmubarak3543 Рік тому

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

  • @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

  • @mrxmry3264
    @mrxmry3264 Рік тому

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

  • @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