Customising the BOM Weather and lovelace - now in HACS

Ok but what is the icon property? The Text comes from the summary_0 but the icon could be saying something different. Mostly sunny is also the same in the BOM pdf file as partly cloudy…
image
image
image

Confusing…

Also the detailed_summary can be different as well…
image

Probably should add I changed the detailed_summary to just the summary in the current text… it’s a juggle. Also there are limited animated icons available. I found a few more but everything is a compromise and it’s possible you might prefer some of the other icons for various conditions… Open to ideas there.

Ahh! That explains it:

 sensor.bom_hobart_icon_0 	fog

Thanks.

See the paragraph I just added - I don’t know when you grabbed the package but I did change a few things so the latest is always on my github. Maybe I should do the HACS thing…

1 Like

If I wanted to alter the card to use the BoM icons (and I’m not 100% sure I do, I like the animated ones), is this the only bit I have to edit (after moving the BoM icons to /weather_icons?

bom-weather-card.js

// #####
// ##### weatherIcons: returns icon names based on current conditions text
// #####

  get weatherIcons() {
    return {
	  'sunny': 'day',
	  'clear': 'day',
	  'mostly-sunny': 'day',
	  'partly-cloudy': 'cloudy-day-3',
          'cloudy': 'cloudy',
	  'hazy': 'cloudy-day-1',
	  'hazey': 'cloudy-day-1',
	  'light-rain': 'rainy-1',
	  'windy': 'cloudy',
          'fog': 'cloudy',
	  'foggy': 'cloudy',
          'showers': 'rainy-3',
          'shower': 'rainy-3',
          'rain': 'rainy-5',
          'rainy': 'rainy-5',
          'dust': 'cloudy-day-1',
	  'dusty': 'cloudy-day-1',
          'snow': 'snowy-6',
          'snowy': 'snowy-6',
	  'storm': 'scattered-thunderstorms',
	  'stormy': 'scattered-thunderstorms',
	  'light-showers': 'rainy-5',
	  'light-shower': 'rainy-5',
	  'heavy-showers': 'rainy-7',
	  'heavy-shower': 'rainy-7',
	  'tropical-cyclone': 'tornado',
	  'clear-day': 'day',
          'clear-night': 'night',
          'sleet': 'rainy-6',
          'wind': 'cloudy',
          'partly-cloudy-day': 'cloudy-day-3',
          'partly-cloudy-night': 'cloudy-night-3',
          'hail': 'rainy-7',
          'lightning': 'thunder',
          'thunderstorm': 'thunder',
          'windy-variant': html`cloudy-${this.dayOrNight}-3`,
          'exceptional': '!!',
    }
  }

Is the fact that they are PNG files instead of SVG files going to be a problem?

there’s an animated and static folder so copy to whichever you are using.

Just FYI I’ve added both these repos to HACS now… just tidying things up.

1 Like

OK Due to popular demand (and against my better judgement), I have added both the card and custom component to HACS now.

You need to add both repos to hacs.
Custom Component (Integration)


Weather Card

image

4 Likes

I tried the BoM icons. Ick!
Reverting now.

Ewe… lol. Yeah. It’s a bugger - I searched high and low for animated svg weather files but could barely expand on what was already there. It’s a pity there aren’t more available.

@DavidFW1960 thanks for putting this together. was a bit tricky to set up but i think im all good now.

was hoping i could replace the chance of rain % in the forecast to the forecast amount of rain. so instead of saying 20%, would say 6-10mm.

do you know if this is possible?

It is. It’s one of the sensors created possible_rainfall. I’ll see if I can add that to the card. Perhaps add this as an issue to the card on github.

I don’t suppose it would be possible to squeeze both values in there?

At the moment I have an extra card to show the amount of rain predicted for the rest of the day and tomorrow.

Probably not on the one line. Currently shows chance of rain and actual rain for today so it would be a new line with the predicted or possible rainfall for today. I could add one for tomorrow as well and you could configure it for a slot. Just remember there are a finite number of slots (4 each side)

Using a slot to show the predicted amount today would be good.

For the forecast I was thinking more along the lines of:

that looks good. might be getting a little crowded tho. id be happy to not have the % at all if its the only way to get it in. i just think the amount of rain is much more relevant than the percentage chance

It was a pretty quick mock-up without adjusting the spacing to the summary.

I find both values useful but as I said, I have them displayed in another card so no big problem if it’s too much hassle to do.

Well I’m struggling to work it out not being fluent in Java. It’s a f’king miracle I worked out the low actually…

2 Likes

Ok I’ve got this… hang on…

Ok so thanks to all you guys who wanted this in HACS… it caused me a LOT of grief because even doing a hard reload and clear cache the old code was like a zombie and it wouldn’t reload my changes hence nothing was loaded or working that I changed.

Anyway… Just uploaded new version with a rain forecast for today and tomorrow. Check the readme and lovelace example for the new code.
Addition 1

            entity_pop_intensity: sensor.bom_gosford_rain_today
            entity_possible_today: sensor.bom_gosford_possible_rainfall_0

Configure the slots:

            slot_l1: daytime_high           #daytime_high
            slot_l2: daytime_low            #wind
            slot_l3: wind                   #visibility but BOM has no visibility reported
            slot_l4: sun_next               #sun_next
            slot_r1: pop                    #pop
            slot_r2: humidity               #humidity
            slot_r3: possible_today         #pressure but BOM has no pressure reported
            slot_r4: sun_following          #sun_following

image

NOTE: Only showing Today there but you can show tomorrow as well… personally I think that’s voodoo but that’s just me…

When you are doing local changes delete the gz file in the same dir, if it exist hacs will serve that.

Doh!!! and Thanks @ludeeus!!!