Jumbo.com integration (Dutch Supermarket)

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.

1 Like

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 :wink:
I hopefully will be able to show you the first results this week.

1 Like

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.

First concept of the lovelace card :wink:

Its not yet finished, but just the first concept I created.
Hopefully I am able to release a first version tomorrow :wink:

1 Like

Ive created a first release of the card:

You could install it via HACS as custom repository.
I created a PR to get it added to HACS, but that is waiting for approval.

Example config:

type: 'custom:jumbo-card'
show_timeslots: true
timeslot_days: 2
show_basket: true
show_orders: true

Configuration options

Option Values Default Details
show_basket true/false true Define if the card should display the available timeslots.
show_timeslots true/false true Define if the card should display the available timeslots.
timeslot_days int 99 Define of how many days of timeslots should be displayed.

I don’t have any open orders so that part I couldn’t test/develop yet :wink:

2 Likes

Updated the parent post of this topic to include your card :slight_smile:

Perhaps interesting, there is a boilerplate card for Lovelace. Although it probably contains more then needed, it has some handy methods and tools like eslint;

I am preparing the next version of the component, which might contain some breaking changes for you. You can already read the README in advance over here:

Changes you can expect:

  • Ability to retrieve your pick ups
  • Ability to retrieve time slots for pick ups

Breaking changes:

  • Some sensors have been renamed to accompany the new pick up sensors
  • The state of the delivery sensor is changed. It no longer reflects the date but the actual state. This allows you to add some automations based on the actual state of the next order. (see the Readme file for some untested ideas).

Let me know your thoughts or ideas. If you have your own automations, feel free to create a pull request on Github so others can benefit.

I just released v0.2.1 of the card.

This release we changed the way variables are used within the card so it is compatible with the coming release of the custom component. and its new features (See issue #1 )

Breaking changes

Almost al the variables of this card are changed!
So please be aware of this.

Just released 0.5.0. See the changes in my previous post and in the release notes:

I’ve added some automation examples to the README file. So far I haven’t been able to test them as my order isn’t far enough yet in the process :sweat_smile:

This,… is really nice!

Would it be possible to write a notification that tells me if there are time slots available for delivery on certain days?

I installed the 0.5.0 version. I did not have an earlier version installed, so it was a fresh install.
I do now have the following lines in my logfile:

Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for jumbo doing I/O at custom_components/jumbo/sensor.py, line 62: api = JumboApi(username, password)
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for jumbo doing I/O at custom_components/jumbo/sensor.py, line 98: self.basket = self._api.get_basket()

This is happening every 15 minutes. It does not matter if there are items in the basket or not.

Another small thing I noticed: When delivery prices are ending on a 0, this is not displayed:

  • type: homedelivery
    start_date_time: ‘2020-05-14T18:00:00’
    end_date_time: ‘2020-05-14T21:00:00’
    available: true
    price:
    currency: EUR
    amount: 650
    format: EUR 6.5
  • type: homedelivery
    start_date_time: ‘2020-05-15T18:00:00’
    end_date_time: ‘2020-05-15T21:00:00’
    available: true
    price:
    currency: EUR
    amount: 795
    format: EUR 7.95

Hi Arjen,

I am aware of the loops: https://github.com/peternijssen/home-assistant-jumbo/issues/5
It shouldn’t lead to any problems, just something I can optimize.

In regards of the 0: Well noticed, will solve this. Thanks!

Good question. That might be possible with an automation, but I am not sure. I think you can loop through the time slots and see if there is a match with an input_datetime.

“Cannot connect to Jumbo api”. I have never seen a succesfull connection.

Strange. Any other errors? Did you validate your credentials?

Update

Just released v0.6.0 which contains the cut off date of orders. This is the date till when you can change an order. This allows you to build automations like a 24h warning up front and a 1h warning up front if you still have items in your basket. See the README.md file for more information.

Some minor changes in between in which I removed any IO blocking events so this component shouldn’t block the start up process of HA and a fix which adds a missing zero to prices.

Thanks for this. Displaying the delivery date on my RPI Display in the kitchen now. Extra points for a feature my wife doesn’t qualify as “nerdy”. Forgive me for being a noob, but how do it get the price to show on the markdown card as EUR xx.xx? Tried a few things, but I end up with a long string like {‘currency’: ‘EUR’, ‘amount’: 7658, ‘format’: ‘EUR 76.58’}.

{{ state_attr(''sensor.jumbo_basket'', ''deliveries'')[0].price.format }}

works. :slight_smile:

It does, thanks very much!
But I had to change ''sensor.jumbo_basket'' to ''sensor.jumbo_delivery''.