I am attempting a Bin Day Collection project for my HA instance but am pretty new to this type of thing so am feeling my way through.
My council have no type of API so I am using MS Power Automate to create variables of dates and type of bin to put out.
I have created an automation on PA which gets the following:
Bin Day Near (the next date for collection
Bin Day Next (The following date for collection)
Bin 1 Near (Name of bin 1 being collected)
Bin 2 Near (Name of bin 2 being collected)
Bin 1 Next (Name of bin 1 being collected)
Bin 2 Next (Name of bin 2 being collected)
I then created a webhook automation which then delivers the appropriate JSON to HA. To start I have been trying to deliver one date.
Is schedule available somewhere?
For instance, in my region they have android/ios app with schedule. So I sniffed the app to find out where it calls to get the data, and used that. Then I fed that data to local calendar and am actioning based on that.
Canât you use restful or similar methods and feed data into calendar?
Maybe you can post the url with schedule here?
Once you have the data stored, it is only about actioning on it?
For me, my company has a site where info is stored. So I parsed that data and fed to calendar as events. Benefit for me is - I only need to do it once a year to grab data and store it into calendar.
Here is my script that I used to feed the data.
I have these selectors for frequency, as this may be different for everyone in region (weekly, bi-weekly, once a monthâŚ) and I wanted script to be universal.
Calendar events are between 8-10AM.
Then I have automation to notify me for instance day ahead:
Thatâs brilliant. But I wish my council was that good! It doesnât have a way of downloading my own collection days for the year.
But thinking about what you have done, I could get the contents of this table from the site and then just do the script more frequently applying the bins to the relevant dates in a calendar.
Why external? There is local calendar as default integration.
I looked at the site - wondering if this is the schedule until end of year? What would be there at the beginning of the year? Basically you can get the data in a form (file?) and then just use script to feed it into calendar
Yes, the intention was to take the value of the nearest date from that table and push that with json via the we hook to webhook_date_near sensor on HA.
I realised that from Power Automate I had to set up individual webhooks for each bit of info, but they are all set up to be sent together.
I have successfully pushed the data to the individual entities on HA and then have been able to show them on my dashboard. The automation waits for the webhook and then updates the entities and it is instant!
I was able to then set within the cards the ability to if âGARDENâ is the value, then the bin would go brown or if âREFUSEâ then green and it works really well.
I have the near dated bins on my âHomeâ page for quick access.
I then set up an automation that every Thursday at 17.30, a message is sent to my wife and I to notify us which bins need to go out which simply says âTomorrowâs bins are Green and Brownâ.
I am really happy with the outcome and now I am being asked by neighbours to send to themâŚI may look at pushing to WhatsApp to see if this is possible.