I’m intermittently getting n/a’s for the current day for the min and max fields. Is this intentional, or should there always be values? The max and min for the current day is quite useful for me for the full duration of the day. Any way to get these values to persist if it’s not a glitch on my side?
Made weather station pages for desktop and mobile
Lovelace code to follow .
I had to use open weather for the weather card so am changing to bom sensor. See how I go
When the max and min temperatures have been passed for the day they become unavailable. Or something like that. It’s the same on the BoM website so it is the data becoming unavailable rather than a problem with this component.
You could use the statistics sensor to store the min/max, However the max_age configuration variable has been broken for some time and you’d need this to store only the last 24hrs. So maybe store tomorrows forecast in a template sensor just before midnight?
Ok, thanks for the tip…
legend, latest update is great
it would be best if this functionality was built into the custom_component though.
slightly off topic but something I have noticed today is that the possibility of rain is out by 10% each day between the % shown on the left, and that which is in the summary text…
I see the same thing but it’s not out by 10% - that was a coincidence in your case. The rain forecast is actually aligned with the wrong day. It’s one day behind where it should be.
I agree and don’t like “n/a”. I have used n/a for “possible rainfall” but I think I should just use “0 mm” rather than n/a.
The problem is, after “max” and “min” has passed, it is no longer a “forecast” and is removed from BoM’s data feed. I will see what I can do about retaining the value for max and min once it stops being available from BoM.
Any idea why this component isnt working for me? Running HassIO 0.78.3
Hi Brendan,
Thanks, heaps for creating this component, it is exactly what I needed. When you get a moment and you are doing some updates, it might be worth adding some default units of measurement for the non-friendly sensors to save users customising each sensor.
sensor.bom_adelaide_chance_of_rain_0:
friendly_name: Chance Today
icon: mdi:water
unit_of_measurement: '%'
sensor.bom_adelaide_possible_rainfall_0:
friendly_name: Possible Today
icon: mdi:water
unit_of_measurement: mm
Also for anyone having difficulty getting started I had to reboot my Pi for it to see the newly added custom component folder, rather than just restarting home assistant.
Thanks again for the hard work that has gone into this.
Joel
Hey peeps, don’t know why I’m getting this error on Hassio
Yes I did click on Raw on git and then copied & pasted the code…
2018-10-07 14:10:50 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform bom_forecast
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 129, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/sensor/bom_forecast.py", line 239, in setup_platform
bom_forecast_data.update()
File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 325, in wrapper
result = method(*args, **kwargs)
File "/config/custom_components/sensor/bom_forecast.py", line 408, in update
tree = xml.etree.ElementTree.parse(file_obj)
AttributeError: module 'xml' has no attribute 'etree'
I’d actually go for mdi:water-percent
but I definitely agree with the customising. I’m still waiting to see if there is an answer for me to get the component to work. It just errors out as I have posted above
I’m not sure why it’s not working for you but I have a fix to give you that should hopefully work. Will send it through tomorrow hopefully
cool, thanks. Looking forward to seeing this in action. It looks great from the examples
Updates:
- 08/10/18: Fixed issue where friendly state wasn’t updating.
- 08/10/18: Attempted fix at the xml problem (Testing required).
@Crewski Thanks mate.
With the latest update, tt’s now getting detected and without errors in log, but for some reason I get this
Or is this the same issue above where Min and Max stop being available on the BoM website?
Also, how can I put them in order by date left to right?
@cheynespc
Any updates on the lovelace code? Looks great!
Different issue… I will look into it. Edit: Fixed! Check out the latest code.
I think the easiest way to order them would be to put them into a group:
weather_forecast:
name: 'Weather Forecast'
entities:
- 'sensor.bom_forecast_laverton_0'
- 'sensor.bom_forecast_laverton_1'
- 'sensor.bom_forecast_laverton_2'
- 'sensor.bom_forecast_laverton_3'
- 'sensor.bom_forecast_laverton_4'
- 'sensor.bom_forecast_laverton_5'
- 'sensor.bom_forecast_laverton_6'
oh yeah. haha, oooops!.
heres my desktop version of my weather page