I think you will need to give it a cooling off period so it “forgets” about you, and then retry with a more friendly scan interval.
I am going to have a crack at doing this with AppDaemon and will share my experience (and hopefully a working solution) here.
I tried disabling the sensor for one day, which didn’t help. Will try re-enabling next week again, will post my results.
Almost ready for sharing, just ironing out a few bugs. I will create a seperate forum thread once it’s ready!
Happy to beta test if required
I have posted the AppDaemon code here, make sure you update the code for your location. A list of valid states, cities and fire districts can be found inside the code.
Please reach out if you are having issues!
state = "VIC"
city = "Melbourne"
fire_district = "Central"
BOM FORECAST APPDAEMON LINK HAS BEEN REMOVED
Tyring to set this up but there are no fire_districts for TAS in bom_forecast.py
Thanks Tom, for some reason the BOM FTP is not currently supplying fire danger rating data for Tasmania. The product ID should be IDT13151 but it is not on their FTP server… not sure what to do in this case.
Should that work with hassio? I have never used AppDaemon before, so I installed it from the Addon store, copied apps.yaml and bom_forecast.py to config\appdaemon\apps
I can see that it is initializing hello world and bom applications and App initialization complete, should I see the result somewhere under Developer Tools?
Hi Brendan,
Thanks for your contribution getting this up and running - just an issue with the FTP side of things.
2018-09-24 15:10:00.823216 WARNING AppDaemon: Unexpected error in worker for App bom_forecast:
2018-09-24 15:10:00.823398 WARNING AppDaemon: Worker Ags: {‘name’: ‘bom_forecast’, ‘id’: UUID(‘b5c345c0-6e97-4af7-9488-6b5f1201e84d’), ‘type’: ‘timer’, ‘function’: <bound method BOMForecast.bom_forecast of <bom_forecast.BOMForecast object at 0x7f82e010d780>>, ‘kwargs’: {‘interval’: 3600}}
2018-09-24 15:10:00.823518 WARNING AppDaemon: ------------------------------------------------------------
2018-09-24 15:10:00.825108 WARNING AppDaemon: Traceback (most recent call last):
File “/srv/appdaemon/lib/python3.6/site-packages/appdaemon/appdaemon.py”, line 581, in worker
funcref(self.sanitize_timer_kwargs(app, args[“kwargs”]))
File “/home/homeassistant/.homeassistant/appdaemon/apps/weather/bom_forecast.py”, line 200, in bom_forecast
ftp.retrbinary("RETR " + weather_forecast_product_id[city] + “.xml”, open(‘weather_forecast.xml’, ‘wb’).write)
PermissionError: [Errno 13] Permission denied: ‘weather_forecast.xml’
I think we are going to have problems running this in AppDaemon in hass.io (but I am not familiar enough with the platform to say for sure). I built and tested this inside a seperate AppDaemon docker container. I am going to try and do a pull request to expand the existing bom.sensor to include forecast data but it’s probably going to take a few weeks for me to grapple with the process.
I’m using Hassio as well. I was seeing similar errors to Brendan but assumed it was because of the missing fire district.
It didn’t work for me as it updates the sensors only once an hour, so all data appeared in the developer tools a bit later. Thanks BrendanMoran, this is amazing.
Modified some code in the FOR cycle to get sensor values for the current day, so Google Home greets me every morning with:
Today in Sydney it will be Mostly Sunny, with the high of 21 degrees Celsius. A chance of rain is 10%. Have a great day.
There might be a better way to get this, but I am getting it like this:
if x == 0:
self.set_state(f"sensor.bom_forecast_tmax", state = weather_forecast_max, attributes = {"Max": weather_forecast_max})
self.set_state(f"sensor.bom_forecast_rain_chance", state = weather_forecast_chance_of_rain, attributes = {"Rain": weather_forecast_chance_of_rain})
self.set_state(f"sensor.bom_forecast_short", state = weather_forecast_summary, attributes = {"Detailed": weather_forecast_detailed})
Glad it worked for you! Makes it all worth it
I am working on a custom_component which should hopefully work on hassio off the bat, I will be testing it on hassio before posting here.
This looks great.
How should I proceed converting this to the Norwegian weather forecast called YR?
I understand the Google say will be in English, but where can I find the details necessary to make a Norwegian weather forecast?
Mine stopped working too around 3 months ago, came good for a while, then stopped again about 1 month ago. I thought it was broken by updates, but now I’m thinking I’m blocked. I’ll try the suggested work around, but looking forward to a more robust solution.
I have created a custom component for this, please see the thread
@Tombstone that’s not the component that this topic is about. This is a completely different custom component.
Hey all,
I’m trying to get the Weather Forecast lovelace card to display the current conditions and forecast from the BOM Weather entity. However, below is all I get from the card. I’m definitely using the weather component and not the sensors:
Has anyone else had this issue or similar? Does it perhaps depend on the station itself?