As I am getting my groceries with Jumbo.com already for a while through delivering it at home, I was missing an option to display this in Home Assistant. Especially when I was expecting a new delivery.
Therefor I reverse engineered their mobile API and built an integration for Home Assistant.
You can follow the instructions here for installation and usage:
@Voxxie created a custom lovelace card. You can follow the instructions here for installation and usage:
Very interesting. But this is only based on your own orders.
Is it possible to scrap their website to see when new timeslots are available for ordering?
Indeed, it currently only shows you your next order. Iāve seen an API endpoint to see possible new timeslots, however they seem to fill fast so I am not sure if it makes sense showing them in HA!?
Thatās exactly the reason. When you have a sensor with available timeslots you could send a notification in order to reserve a timeslot through their website.
That would be absolutely brilliant indeed. Those timeslots are a pain in the ass especially right nowā¦ a notification when there are slots available would be a great addition.
@heartkingz@bhartman How would you see this sensor? Is the state the next available timeslot available? Would you pick a certain day (like Wednesday) and want to know the next available timeslot on such a day? Or would it be like the orders that you see the next available timeslot and in the āmore infoā dialog you see all available timeslots?
For me I would like to see the next available timeslot after a certain date (so that you donāt get all available slots but only the ones youāre interested in), or as an alternative in combination with an order frequency (# days) after your last confirmed order.
Well, I donāt think the API can but we can do that within the code. The only thing is that we need to store that date somewhere. Putting it within the configuration.yaml file isnāt really helpful, as you would need to restart/reload HA every time you change the date.
So I am thinking more from an āautomatedā system, for example the first available moment, 5 days after your last order., in which 5 is a configurable number within the settings of HA.
A general notice by the way to all: Itās not an official supported API. So if they ever change something, the system will break and we need to fix it. I donāt think they change the API that often, but just to be aware.
Maybe it would be a idea you can choose which days you want to have exposed in configuration.yaml. If i speak for myself we pick up the groceries in the weekend.
An idea could be to make only one sensor and expose the days on the attributes side?
Hmā¦ strange that I see the information myself. Will check.
And yeah, currently updates every 2 hours. I am always a bit holding back with using unofficial APIs as I want to avoid flooding their system, being marked as a bot and then have to delete the integration. Happy to change it to a more suitable setting if we think it should be different
I would sugest that you use a state for that, for example input_number.day_numer so that you only see slots from that day. Or maybe you can select nput_numer.week_number. It is easy to edit those states with automation scripts.
For example if you recieved an order, that you build a automation script that automaticly search for a new slots for the specific weeknumber/date.
I am not a hero at Python, but I just released version 0.3.0. This contains a third sensor named ājumbo.time_slotsā indicating the next available time slot. Within the more dialog you can see any future time slots available.
Time slots are based on the store that you configured within your account. So no need to configure a store at the side of HA.
Any javascript guru might also be capable of creating a custom lovelace card, showing all the information nicely. I might start up that process soon. Letās first get the data in sensors so automations can be created.
Wow thatās fast. I see the available timeslots as a sensor. Unfortunately all with the text [object Object], [object Object] while in the developer states I see the actual values.
Iāll try to figure out why this happens tomorrowā¦
For me they are showing correctly in the more info window. Any chance you have some kind of modification on the more info modals? Anyone else can confirm either they see [object Object] or the actual information?
If anyone created automations or anything else based on the collected information, please share. Always great to see what we could create with the information provided. If some information is missing or anyone has some change requests, please let me know or create a PR.