I’ve been trying to set up some lights based on some calendar events but fear I’ve been down the rabbit hole that long I can’t find my way out again!
So, I’m trying to build a notification light to let me know which bins to put out on a given week.
I’ve finally managed to scrape the local site and have a list of which bins go out on what date (dates change due to public holidays, bins change when they start collecting the garden bin, etc).
I am running the scraper on GitHub, runs up selenium, generates a JSON file I can then download to process (tried this on HA but kept running into issues). The site gives me the next 3 months worth of dates.
Now my issue is I can’t work out which way to go from here. There doesn’t appear to be a way I can schedule the download, process it, then ‘load in’ 3 months worth of future events to fire off, as and when required.
Rather than trying to load in 3 months worth of events, should I instead be looking to automate the scrape once a week and just set up that week’s event instead?
I’ve circled round a few times, should I write a python script to run every day to look at the downloaded file, should I trigger the scrape once a week, should I load the file into node-red and process it that way, should I be writing an add-on.
I’m not looking for someone to do my work for me but point me in the right direction as I seem to be struggling with the proper way to approach driving the data through the system.
Any pointers much appreciated!