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.
I had to go to jumbo.com to see what it was. Then I clicked on the beer order link. 5 hours later…
Wauw looks promising !
But i can’t get it to work at me Intel NUC running HassOS. ( see the issue i logged at the repository)
Its warning my about missing ‘jumbo_api’
Any update on HACS ?
I will check your issue.
In regards of HACS, there is a pending PR: https://github.com/hacs/default/pull/367
Work-around: add https://github.com/peternijssen/home-asssistant-jumbo
to the settings as a repository.
@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.
Could that be possible through that jumbo api?
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?
Installation with HACS went smooth. I see both sensors, however when I open the jumbo_order sensor I see my first order, but also the following :
orders [object Object], [object Object], [object Object]
When I go to the developer portal and check the state attributes all order information is visible.
And a quick question: when does it updates itself? When HA restarts, or periodicly?
(edit) looks like it updates itself every 2 hours…
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.
I can see timeslots
Screenshot_2020-04-28-21-50-55-385_io.homeassistant.companion.android|230x500
And they are corresponding with the information in the app
Maybe extend it with time slots for the pick-up points?
Yeah I was thinking of making separate sensors. However I haven’t been using pick-up points yet, so I have to try some stuff with it first to reverse the API.
Renamed the github repository btw. Noticed there was a S too much in the name.
I started the development of an custom lovelace card to make a nice overview of the sensors.
This will be my first custom lovelace card
I hopefully will be able to show you the first results this week.
Released 0.4.0 with some requested changes:
Not sure if anyone already created automations, but the pricing in the orders have been changed and therefor could be a breaking change.