Australian Weather Forecast using BOM Public FTP

No problems here. I’m on 0.94.3 right now.

Problem was resolved with the blank init.py file

Hi All,

I am in the process off getting my head around HA.

One of the things I want to be able to have is the weather, (I live in Adelaide SA Australia).
Found a few about the BOM, this topic seems to have what I would like, forecast, daily and radar map.

As I am a newbie, can some be able to post the latest working code, and the required folders, to be able to get it working, in both yaml and Lovelace cards

Thanks in advance
Deblen

Ok after finally getting this to work I have struck a few issues. Lithgow gets it data from deep within IDN11060. I have had to add IDN11060 to the sensor.py file for it to even look at it and give some data, but it’s only giving the generic Sydney info, and that’s absolutely useless here.

Is there any way to read a sub section of a file based on this “parent” area and the location’s name??

Same problem I have living in central Victoria.
As such I wrote another weather component based on the www.willyweather.com.au data (from BoM) that takes readings from nearby weather stations, rather than a single one. That way, all the data is populated.
Look for WillyWeather in these forums if you are interested.

Hi - I upgraded to the HACS version of this integration from one I manually installed. My only change to the config was to add the icon, fire danger and UV.

I use friendly mode, and now I only get only one day sensor (tomorrow).

Based on the error in the logs, I removed the new monitored conditions and it now works. Any suggestions?

  - platform: bom_forecast
    name: MyName
    forecast_days: 6
    rest_of_today: True
    friendly: true
    friendly_state_format: '{min} to {max}, {summary}'
    product_id: IDV10703
    monitored_conditions:
      - 'max'
      - 'min'
      - 'chance_of_rain'
      - 'possible_rainfall'
      - 'summary'
      - 'detailed_summary'
      - 'icon'
      - 'uv_alert'
      - 'fire_danger'

This is the error in the logs:

Log Details (ERROR)
Thu Dec 05 2019 17:34:59 GMT+1100 (Australian Eastern Daylight Time)
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 275, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 309, in _async_write_ha_state
    state = self.state
  File "/config/custom_components/bom_forecast/sensor.py", line 361, in state
    condition, self._index))
  File "/config/custom_components/bom_forecast/sensor.py", line 425, in get_reading
    _FIND_QUERY.format(index, 'uv_alert')).text
AttributeError: 'NoneType' object has no attribute 'text'

I have only tested:

    friendly_state_format: '{max}, {summary}'

With the icon and new conditions. Did you try that?

Just testing a fix for this now. Will release a new version shortly. Thanks to @exxamalte again!

1 Like

Hi all, I have this in the config yaml.

sensor:
  - platform: bom_forecast
    product_id: IDW12300
    name: Perth
    forecast_days: 6
    rest_of_today: True
    friendly: True
    friendly_state_format: '{max}, {summary}'
    monitored_conditions:
      - 'max'
      - 'min'
      - 'chance_of_rain'
      - 'possible_rainfall'
      - 'summary'
      - 'detailed_summary'
      - 'fire_danger'
      - 'uv_alert'

When I add the glance card, I find that the icons are missing for some days.

Annotation 2020-01-27 121605

Also, I could not figure out how to produce a glance card that is like this?

Appreciate help please.

This component (an updated component with more features) and the Lovelace card are both available in HACS. Maybe check this thread here https://community.home-assistant.io/t/customising-the-bom-weather-and-lovelace-now-in-hacs/

Many thanks David. I have now installed HACS, and installed both the BOM Forecast integrations + BOM Weather Card plugins as per instruction.

I have also added the following to config yaml

sensor:
  - platform: bom_forecast
    product_id: IDW12300
    name: Perth
    forecast_days: 6
    rest_of_today: true
    friendly: false
    friendly_state_format: '{max}, {summary}'
    monitored_conditions:
      - 'max'
      - 'min'
      - 'chance_of_rain'
      - 'possible_rainfall'
      - 'summary'
      - 'detailed_summary'
      - 'icon'
      - 'uv_alert'
      - 'fire_danger'

But I still could not figure out how to create that cool looking glance card like the image above? I know I am missing something I just could not figure out what?

Please use the other thread and post your BOM component configuration as well as the FTP component and post your lovelace configuration as well. Can’t really help without much more info.

Hello All,

I am from a small north east town in Victoria. On the bom website the forecast my product_id is made up from product derived from IDV10753 and IDV17003. How do i set this up as i single product_id? I have tried entering one or the other and it fails on both. The sensor works fine if i say put it IDV10450 (Melbourne).

Thanks

It won’t support that unfortunately.

Thanks anyway, I select a town that’s close by for now.

Yeah that’s the best approach as I suggested up above to someone else.

@DavidFW1960 and @BrendanMoran Thank you guys for the Bom forecast integration and the BOM weather card. I live in the sydney region and use the Prod ID of IDN10064 for the forecast however I live in the north western suburbs.

Upon looking at the IDN10064.xml the forecast for certain cities are also available within this xml.
E.g. The location of Penrith within the file provides the forecast for 7 days. While the remaining locations Liverpool, Parramatta etc. provide 1 day which will be the most accurate for any suburbs closest to those locations.

Is there a way to provide a mechanism to extract this data rather than using the Syd location forecast which is rather inaccurate for the different locations within Syd?

I will have a look at this when I am back home next week. Busy with family for a few days.

2 Likes

ok so yeah… seen this before. Liverpool looks like this:
image
It uses a combo of 2 IDNs for it’s data.
I have not looked at supporting that and it’s really above my hacking abilities at this point to do so.
I’d suggest picking the best station with a single IDN number for your location. Sorry.

Let me try to explain a bit more…
For Syd the file / IDN number which the forecast gets extracted from is IDN10064.xml which looks like

Data is extracted from the area type = “metropolitan” and “location” nodes where the description is “Sydney” which is essentially the weather for the city.

However Penrith also provides a 6 day forecast, but there is no way to access this info.

The rest of the nodes however only provides today’s forecast.

If there is a way to pass this secondary location (e.g. Penrith which can override the default which is description=“Sydney”) and extract the corresponding info one might get more accurate info if they are closer to that location. Obviously if there is no source data it would be good to default to the corresponding node where description =“Sydney”.

My Python skills are almost none existent hence thought I would reach out to you and see if you would be able to do this.