Creating a Weather Dashboard in Home Assistant (HA version 2024.4)

Поделиться
HTML-код
  • Опубликовано: 13 янв 2025

Комментарии • 63

  • @fablav
    @fablav 9 месяцев назад

    Good job and THANK YOU!

  • @motowoody66
    @motowoody66 5 месяцев назад +1

    love the full dashboard would like to see the code for the weather sensor, I presume it comes from setting up the weather card

    • @My_Smart_Home
      @My_Smart_Home  5 месяцев назад

      Yes it does. I have a video about how to do it.
      ruclips.net/video/pxGb4cU2-xY/видео.html

  • @Hichiro66
    @Hichiro66 5 месяцев назад +1

    Regarding your latest video about the dashboard, you did add weather_summary1/2/3/4/..
    Can you explain what it does ? It's the last missing piece for completing this part of my dashboard
    Thanks

    • @My_Smart_Home
      @My_Smart_Home  5 месяцев назад +1

      This is very specific to my area. It yr.no's written weather forecast. Im pulling it in from an api and splitting into 5 templates because a template can only be 120 (or something) characters.

    • @Hichiro66
      @Hichiro66 5 месяцев назад

      @@My_Smart_Home ok I understand, I ll try to replace it by pollen alert from my integration. Thanks

  • @MichaelLefever-ke2td
    @MichaelLefever-ke2td 9 месяцев назад +1

    Is it possible that I don't have precipitation probability in my area? It does not show when I go in developer tools and use the service: get forecasts

    • @My_Smart_Home
      @My_Smart_Home  9 месяцев назад

      Maybe you use a different weather integration. I use one called Met.

    • @MichaelLefever-ke2td
      @MichaelLefever-ke2td 9 месяцев назад

      @@My_Smart_Home I use the same..

    • @uses0ap
      @uses0ap 7 месяцев назад

      I am also missing that attribute (same integration)

  • @BenedetFamily
    @BenedetFamily 6 месяцев назад

    What code do I use to get the date to use the short form rather than the long form? For instance, I want it to say Tue NOT Tuesday.
    Thx for updating this! Super clear as always.

  • @terraframes
    @terraframes 9 месяцев назад

    Thank you!
    Now everything is working again, but I was wondering, is there anyway to translate the state to another language? I do believe you had it in the original video, but it was a specific fix that you made for your HA instance.

    • @My_Smart_Home
      @My_Smart_Home  9 месяцев назад +2

      Hi, yeah you could use something like this for every condition attribute. But I'm looking for a better/different solution because I think its too much code for a small task.
      This translates into norwegian.
      attributes:
      condition: >
      {%- set state = daily['weather.forecast'].forecast[0].condition -%}
      {% if state == 'clear-night' %} Klar natt
      {% elif state == 'cloudy' %} Overskyet
      {% elif state == 'exceptional' %} Fantastisk
      {% elif state == 'fog' %} Tåke
      {% elif state == 'hail' %} Hagl
      {% elif state == 'lightning' %} Torden
      {% elif state == 'lightning-rainy' %} Torden, regn
      {% elif state == 'partlycloudy' %} Delvis overskyet
      {% elif state == 'pouring' %} Pøsregn
      {% elif state == 'rainy' %} Regn
      {% elif state == 'snowy' %} Snø
      {% elif state == 'snowy-rainy' %} Sludd
      {% elif state == 'sunny' %} Sol
      {% elif state == 'windy' %} Vind
      {% elif state == 'windy-variant' %} Vind
      {% else %} Vet ikke
      {% endif %}

    • @terraframes
      @terraframes 9 месяцев назад

      @@My_Smart_Home thank you! I’ll try it later, but hopefully HA will integrate something like custom translations (believe there’s one i hacs), though time will tell

  • @jerdejager
    @jerdejager 3 месяца назад

    Everything works, except for the partlycloudy_night icon. I can't figure out what's wrong. Double checked the name, but it's right. Is there a know issue with it?

    • @My_Smart_Home
      @My_Smart_Home  3 месяца назад

      That sounds really weird. Since all the other icons work it must be a difference between the weather condition (state) and the icon filename

    • @jerdejager
      @jerdejager 3 месяца назад

      @@My_Smart_Home Thanks for the response. However I checked it multiple times. Restarted HA, waited a full hour to see if the sensor had to reload... still no partlycloud_night. I ended up using the overcast-night icon which does work. Thanks for the quick response!

  • @sbarmen
    @sbarmen 5 месяцев назад

    Hello! Very vool and stylish :) Love it! Is it at all possible to get the translated states to show on the dashboard button-card? For example for condition it looks a bit strange when it says Rainy when everything else is local language.

    • @My_Smart_Home
      @My_Smart_Home  5 месяцев назад

      Yes, I translate all conditions to norwegian. There is probably a better way to do it, but my method looks something like this:
      attributes:
      condition: >
      {%- set state = daily['weather.forecast_nilsen_goberg'].forecast[0].condition -%}
      {% if state == 'clear-night' %} Klar natt
      {% elif state == 'cloudy' %} Overskyet
      {% elif state == 'exceptional' %} Fantastisk
      {% elif state == 'fog' %} Tåke
      {% elif state == 'hail' %} Hagl
      {% elif state == 'lightning' %} Torden
      {% elif state == 'lightning-rainy' %} Torden, regn
      {% elif state == 'partlycloudy' %} Delvis overskyet
      {% elif state == 'pouring' %} Pøsregn
      {% elif state == 'rainy' %} Regn
      {% elif state == 'snowy' %} Snø
      {% elif state == 'snowy-rainy' %} Sludd
      {% elif state == 'sunny' %} Sol
      {% elif state == 'windy' %} Vind
      {% elif state == 'windy-variant' %} Vind
      {% else %} Vet ikke
      {% endif %}

  • @ssaxin81
    @ssaxin81 4 месяца назад

    Thanks a lot for your tutorials, followed them with great interest. Strange issue with animated icons - they show perfectly on mobile but wont render on PC in latest chrome maybe someone have a hint ?

  • @SuperKnightwind
    @SuperKnightwind 9 месяцев назад

    can you create a AC thermostat controller too?

    • @My_Smart_Home
      @My_Smart_Home  8 месяцев назад +1

      Its my next video. Probably tomorrow. Sorry about the late reply

  • @mAfl1980
    @mAfl1980 9 месяцев назад

    thx for this great content ! I need more of that :)
    I haven't the SVG files so my card is without icons ....
    where can I found the icons ?

    • @terraframes
      @terraframes 9 месяцев назад

      There's another video called "Animated Weather Card in Home Assistant" ruclips.net/video/xDqS7AYFO9o/видео.htmlsi=85LwfrVVbatkccOT where he goes through how to set it up, as well as the source for the svg files that he uses.

    • @My_Smart_Home
      @My_Smart_Home  9 месяцев назад

      Yeah sorry. Like @terraframes says. Theres another video explaining it. I probably should have been more clear.

  • @LucaTraversaro
    @LucaTraversaro 3 месяца назад

    Hi! How can i have a translated output in my card for the variable conditions? Dayname is correctly displayed in my language. Thank you!

    • @My_Smart_Home
      @My_Smart_Home  3 месяца назад

      I use a macro in the templates. Create a file in the custom_templates folder calle weather_translate.jinja. Use something like this (norwegian).
      {% macro translate_condition(state) %}
      {% set conditions = {
      'clear-night': 'Klar natt',
      'cloudy': 'Overskyet',
      'exceptional': 'Fantastisk',
      'fog': 'Tåke',
      'hail': 'Hagl',
      'lightning': 'Torden',
      'lightning-rainy': 'Torden, regn',
      'partlycloudy': 'Delvis overskyet',
      'pouring': 'Pøsregn',
      'rainy': 'Regn',
      'snowy': 'Snø',
      'snowy-rainy': 'Sludd',
      'sunny': 'Sol',
      'windy': 'Vind',
      'windy-variant': 'Vind'
      } %}
      {{ conditions[state] if state in conditions else 'Vet ikke' }}
      {% endmacro %}
      Then, in the template you could call this macro like this:
      {% from 'weather_translate.jinja' import translate_condition %}
      {{ translate_condition(daily['weather.forecast'].forecast[1].condition) }}

  • @erans
    @erans 5 месяцев назад

    getting an error :
    ButtonCardJSTemplateError: RangeError: Invalid time value in 'return helpers.formatDateWeekday(entity.attributes.datetime1)'

    • @sbarmen
      @sbarmen 5 месяцев назад

      Check the sensor if you have an attribute setup for datetime1. Go to developer tools and have a look.

  • @uses0ap
    @uses0ap 7 месяцев назад

    My forecast bubble card opens to the top of the screen (on mobile only). There is no empty space above the bubble card header. Any suggestions on how to fix? I've tried messing with the bubble card pop up settings, but no change regardless of settings. Great work in the videos! Keep up the good work!

    • @My_Smart_Home
      @My_Smart_Home  7 месяцев назад +1

      You updated to Bubble 2.0? My top margins was reset to 0 after updating. It can be changed in the popup settings. Styling Options > Popup styling > top margin

    • @uses0ap
      @uses0ap 7 месяцев назад

      @@My_Smart_Home thanks for the reply. Unfortunately, any changes to the popup margin settings have no effect. I think it may be related to the forecast card styles template overriding the bubble popup parameters

    • @My_Smart_Home
      @My_Smart_Home  7 месяцев назад

      @@uses0ap its not supposed to have an effect. But you could of course try to remove the forecast card and place any other basic card there instead.

    • @My_Smart_Home
      @My_Smart_Home  7 месяцев назад +1

      @@uses0ap its not supposed to have an effect. But you could of course try to remove the forecast card and place any other basic card there instead.

  • @-pz3wq
    @-pz3wq 8 месяцев назад

    Everything works for me except the icons I verified that the path and name is correct is correct but still could get them to display.

    • @My_Smart_Home
      @My_Smart_Home  8 месяцев назад

      Does the path look correct in developer tools if you search for the weather sensor you created?

  • @b0wseer
    @b0wseer 9 месяцев назад

    The code is not working for me, the senor "Tutorial Weather Forecast" does not show up after restart of HA??

    • @My_Smart_Home
      @My_Smart_Home  9 месяцев назад

      You sure you placed it correctly in your configuration.yaml file?

    • @b0wseer
      @b0wseer 9 месяцев назад

      @@My_Smart_Home Its in my template.yaml with all my other templets

    • @My_Smart_Home
      @My_Smart_Home  9 месяцев назад

      @@b0wseer Ok, Its hard to know without looking at the code myself. Send me an email?

    • @b0wseer
      @b0wseer 9 месяцев назад

      @@My_Smart_Home Sure! adress?

    • @b0wseer
      @b0wseer 9 месяцев назад

      @@My_Smart_Home Sure, whats the adress?

  • @yossicohen5504
    @yossicohen5504 9 месяцев назад

    Love your vids! What font are you using?

    • @My_Smart_Home
      @My_Smart_Home  9 месяцев назад

      Cheers! Its called Montserrat from Google Fonts, I have a video about how to use it

    • @yossicohen5504
      @yossicohen5504 9 месяцев назад

      @@My_Smart_Home thanks! I saw it and added a theme. Please release more of these! I’m happy to support 👍🏻

  • @tedev
    @tedev 9 месяцев назад

    how about an android tv remote controller? :)

    • @My_Smart_Home
      @My_Smart_Home  9 месяцев назад +1

      Good idea. I actually have it on my ideas list. I don't use Android TV but I guess a remote card/dashboard could be adapted to work on any tv/device.

  • @bentubeblu
    @bentubeblu 5 месяцев назад

    Great content. Please increase font size and stay with the dark theme background. The switching between the two is jarring.

    • @My_Smart_Home
      @My_Smart_Home  5 месяцев назад +1

      Gotcha. Might try dark mode in next video :)

  • @alondinbar6193
    @alondinbar6193 9 месяцев назад

    Great, keep going with 2-3 (or 7😅) videos per week💪

  • @alondinbar6193
    @alondinbar6193 8 месяцев назад

    Again new update broke the animated icon

    • @My_Smart_Home
      @My_Smart_Home  8 месяцев назад

      Oh really?! I haven't updated yet. Guess I'm not done with the weather cards yet

    • @alondinbar6193
      @alondinbar6193 8 месяцев назад

      @@My_Smart_Home true, update also the push update also at Gumroad(; its ok to release 2-3 videos together dont worry

    • @My_Smart_Home
      @My_Smart_Home  8 месяцев назад +1

      Hi again. I just updated HA to the latest version and all animated icons works as before for me

  • @MichaelAlderete
    @MichaelAlderete 8 месяцев назад

    I'm similarly baffled by the change for weather to require using a service. I spent a half-day debugging and converting my old custom weather template when it broke with the change. PITA.
    A suggestion and a request:
    * For your Gumroad offerings, maybe make an attractively priced bundle option available? Get all of your code examples for, say, $10 or $15. That makes it a no-brainer to "upgrade" from the one example someone wants to getting a larger collection. They get a good deal, you get the upsell.
    * For this weather dashboard, if I wanted to do a graphic version of the forecast, how could I chart that, as either a line or bar chart? (I'm also interested in showing both high and low values for the forecast, but that should be easy once I know how to draw a chart...)

    • @My_Smart_Home
      @My_Smart_Home  8 месяцев назад +1

      Cheers! Yeah the new service thing makes it a bit harder to work with.
      Good idea about the bundle, I'll fix something soon.
      In terms of graph/chart, I don't really know how to do that with just Button Card, But I'm certain you could do something with Mini Graph Card from HACS, you could put the attribute array into bars.