Customising the BOM Weather and lovelace - now in HACS

All of the new API’s have a metadata field in the json that then contains a issue_time field, so yes it is there for everything. Note that for warnings the issue_time only exists if there are active warnings.

When I get time I am going to write to the BoM and ask them about including more information in the new weather page (ie, pressure, dew_pt etc). To do that they will need to add it into the json :slight_smile:

I might also mention how home automation systems could benefit from being able to ingest data more easily and ask why the keep using polling instead of mqtt to retrieve data. This polling thing is crazy, it did the maths and if your leave weather.bom.gov.au open for 24 hours it consumes 20Mb just for the json (ie. exclude the radar from the total). Considering how little the data actually changes that is nuts.

1 Like

How do I configure this for 2 locations? Say for example I live in Canberra but had a house down the coast as well (I am not that well off and don’t, but quite a lot of people do). I might like to pull the observations from 2 different places.

Interestingly enough I have 3 weather stations in 3 completely different directions (around 5-9km away). Only the the most distant of those will ever provide air pressure (the airport one). If you where to include forecast info, I would want to use my actual location to get the most accurate forecast, but the I guess would result in me get observations from the closest weather station (which is a temporary portable unit and probably not as accurate as the others in the area).

My thoughts are the observations and forecasts stuff should be in different integrations with the ability to configure/name multiple locations in each integration.

Did you try adding a second integration?

I have updated to include forecast data too, and also renamed so it won’t interfere with the legacy bom component.


So far so good! The BoM Lovelace card will need a bit of rejigging for rain range (e.g 0 to 2mm) and the icons.
1 Like

The rain range should be the same… Are you saying there are different conditions to current?

I’ll check this out tomorrow. Did you add the last_changed attribute to any entities?

The FTP forecast integration creates a sensor with a state like “0 to 2 mm” but the new API just presents a min and a max as two seperate sensors. I suppose I could rig it so it creates a sensor which is in the same format as the old one

That would be good otherwise I think template sensors will be needed to combine them. Other weather providers I see have them combined so pulling them in as 2 sensors will break compatibility with say dark-sky etc.

I think changing it to keep the values separate is a better idea. Sorry @DavidFW1960. The reason for this is having those values available separately is probably better if you want to use them in automations, such as if the minimum rain forecast in the next day is more than X disable the irrigation.

I will do both, I’m using sensors with unique ID so you can disable any sensors you don’t need. Perhaps I will also create an icon mapping to map the new icon names back to the old numerical values

2 Likes

The icons are coming in already as a condition… The current FTP integration does that mapping already. I need to do some one-to-one comparisons to see if there are any issues. I do know having the predicted rainfall will break the card for other weather providers though but I can use template sensors to unbreak but both would be potentially useful.

Both would be useful. I currently have a template to extract the high and low precipitation prediction, average them and multiply that result by the chance of rain. I use this for irrigation control. Not having to extract the high and low from a combined sensor would simplify things.

When will this be out Brendan? I don’t want to have to change the templates twice if it’s just a matter of waiting a couple of days…

I’m also seeing 2 Bureau of Meterology integrations I can add now… One gives an error and the other is working… is that because I had the previous one before you renamed? I did delete from HACS both and also removed the integration in HA and restarted before adding them…

Full disclosure… I used to work at the BoM. So you know I mean it when I say, best of luck to you!

2 Likes

Yes I Know it won’t be quick getting them to do anything. It took them 3 months to fix an error in the ftp observations. But they did at least fix it eventually.

Forecasts/Daily via the API is returning:

{"data":[{"rain":{"amount":{"min":5,"max":15,"units":"mm"},"chance":80},"uv":{"category":"veryhigh","end_time":"2020-10-28T05:10:00Z","max_index":8,"start_time":"2020-10-27T22:00:00Z"},"astronomical":{"sunrise_time":"2020-10-27T19:00:06Z","sunset_time":"2020-10-28T08:19:08Z"},"date":"2020-10-27T13:00:00Z","temp_max":21,"temp_min":12,"extended_text":"Cloudy. High (80%) chance of showers, most likely during this afternoon and evening. The chance of a thunderstorm during this afternoon and evening. Winds south to southwesterly 15 to 20 km/h turning southeasterly in the early afternoon then becoming light in the evening.","icon_descriptor":"shower","short_text":"A few showers.","fire_danger":"Low-Moderate","now":{"is_night":false,"now_label":"Max","later_label":"Overnight Min","temp_now":21,"temp_later":14}},{"rain":{"amount":{"min":8,"max":20,"units":"mm"},"chance":90},"uv":{"category":"veryhigh","end_time":"2020-10-29T05:20:00Z","max_index":8,"start_time":"2020-10-28T22:00:00Z"},"astronomical":{"sunrise_time":"2020-10-28T18:59:06Z","sunset_time":"2020-10-29T08:20:01Z"},"date":"2020-10-28T13:00:00Z","temp_max":21,"temp_min":14,"extended_text":"Cloudy. Very high (90%) chance of showers. The chance of a thunderstorm. Light winds becoming south to southwesterly 25 to 35 km/h in the early afternoon.","icon_descriptor":"shower","short_text":"Showers.","fire_danger":"Low-Moderate"},{"rain":{"amount":{"min":0,"max":2,"units":"mm"},"chance":40},"uv":{"category":"veryhigh","end_time":"2020-10-30T05:10:00Z","max_index":8,"start_time":"2020-10-29T22:00:00Z"},"astronomical":{"sunrise_time":"2020-10-29T18:58:06Z","sunset_time":"2020-10-30T08:20:55Z"},"date":"2020-10-29T13:00:00Z","temp_max":23,"temp_min":12,"extended_text":"Mostly sunny day. Medium (40%) chance of showers in the evening. The chance of a thunderstorm in the evening. Winds southwesterly 15 to 20 km/h becoming light during the morning.","icon_descriptor":"shower","short_text":"Possible late shower.","fire_danger":"Low-Moderate"},{"rain":{"amount":{"min":3,"max":10,"units":"mm"},"chance":60},"uv":{"category":"veryhigh","end_time":"2020-10-31T05:10:00Z","max_index":8,"start_time":"2020-10-30T22:10:00Z"},"astronomical":{"sunrise_time":"2020-10-30T18:57:08Z","sunset_time":"2020-10-31T08:21:49Z"},"date":"2020-10-30T13:00:00Z","temp_max":27,"temp_min":15,"extended_text":"Partly cloudy. Medium (60%) chance of showers, most likely in the morning and afternoon. The chance of a thunderstorm. Winds east to northeasterly 15 to 25 km/h tending north to northeasterly during the morning then becoming light during the evening.","icon_descriptor":"storm","short_text":"Shower or two. Possible storm.","fire_danger":"Low-Moderate"},{"rain":{"amount":{"min":0,"max":1,"units":"mm"},"chance":30},"uv":{"category":null,"end_time":null,"max_index":null,"start_time":null},"astronomical":{"sunrise_time":"2020-10-31T18:56:11Z","sunset_time":"2020-11-01T08:22:43Z"},"date":"2020-10-31T13:00:00Z","temp_max":26,"temp_min":13,"extended_text":"Mostly sunny morning. Slight (30%) chance of a shower, most likely later in the day. Light winds becoming south to southwesterly 15 to 25 km/h during the day.","icon_descriptor":"mostly_sunny","short_text":"Partly cloudy.","fire_danger":null},{"rain":{"amount":{"min":0,"max":0.4,"units":"mm"},"chance":30},"uv":{"category":null,"end_time":null,"max_index":null,"start_time":null},"astronomical":{"sunrise_time":"2020-11-01T18:55:15Z","sunset_time":"2020-11-02T08:23:38Z"},"date":"2020-11-01T13:00:00Z","temp_max":23,"temp_min":15,"extended_text":"Partly cloudy. Slight (30%) chance of a shower, most likely during the morning. Winds southwesterly 20 to 30 km/h tending southerly 25 to 35 km/h during the morning.","icon_descriptor":"mostly_sunny","short_text":"Partly cloudy.","fire_danger":null},{"rain":{"amount":{"min":0,"max":null,"units":"mm"},"chance":20},"uv":{"category":null,"end_time":null,"max_index":null,"start_time":null},"astronomical":{"sunrise_time":"2020-11-02T18:54:21Z","sunset_time":"2020-11-03T08:24:33Z"},"date":"2020-11-02T13:00:00Z","temp_max":24,"temp_min":14,"extended_text":"Partly cloudy. Slight (20%) chance of a shower. Winds southerly 15 to 20 km/h.","icon_descriptor":"mostly_sunny","short_text":"Partly cloudy.","fire_danger":null}],"metadata":{"response_timestamp":"2020-10-27T22:28:51Z","issue_time":"2020-10-27T21:29:21Z","forecast_region":"Central Coast","forecast_type":"metropolitan"}}

But the extended_text _0 is this:


and the entity is not showing in dev-tools

I’m fixing this right now, reached the 255 character limit and i forgot to trim it. I will have a new release out later today.

1 Like

Also noticing it’s not making the min_0 unavailable after ~4am either so that’s a plus… so maybe I can kill that template sensor now as well as the max_0 presumably…

and it’s running the UV together like veryhigh… not very high… is there a list of states for that? I might take a look… Pretty sure I found a doc.

The current FTP component gives this:


I’m not seeing that data in the new API… It is available on their uv page here http://www.bom.gov.au/uv/ though.
I can use this to parse the uv though it would be nice to get full summary information
image

uv is in the ‘daily’ endpoint once again as separate fields.

It is but not with recommended sun protection times etc…

"uv":{"category":"veryhigh","end_time":"2020-10-29T05:20:00Z","max_index":8,"start_time":"2020-10-28T22:00:00Z"}

I suppose you could use a Template Sensor to piece it together. (If we get the start/end time in the sensor which isnt currently provided)