[DO NOT MERGE!] [New feature]: Incorporate Delivery/Livraison bags #549
[DO NOT MERGE!] [New feature]: Incorporate Delivery/Livraison bags #549ThomasDelsart wants to merge 8 commits into
Conversation
| log.error(err) | ||
| items += self._get_favorites() | ||
|
|
||
| # if state is empty (first scanning iteration), initialize it with the current favorite items |
| raise | ||
|
|
||
| @classmethod | ||
| def delivery_item_conversion(cls): |
There was a problem hiding this comment.
Needed because delivery bags have not the same attributes in the API call than Items
| store: dict = data.get("store", {}) | ||
| self.store_name: str = store.get("store_name", "-") | ||
|
|
||
| self.manufacturer_properties: dict = data.get("manufacturer_properties", {}) |
There was a problem hiding this comment.
New attributes for delivery items
| return [] | ||
| return [Item(item, self.location, self.config.locale) for item in items] | ||
|
|
||
| def convert_raw_delivery_item(self, raw_delivery_item: dict, mapping: dict) -> Item: |
There was a problem hiding this comment.
Conversion of delivery data, not in the same format as item data. Adding some logic to have correct format to build the Item object
| "element_types_accepted": [ | ||
| "ITEM", # All items/products in delivery | ||
| "HIGHLIGHTED_ITEM", # Item with a special highlight on the top of the delivery pannel | ||
| # "DUO_ITEMS", |
There was a problem hiding this comment.
Not tested yet so still there but commented
antonioli86
left a comment
There was a problem hiding this comment.
It works for the delivery items but seems missing the catering part - another endpoint?
|
If I add 'FILL' to display_types_accepted and 'ITEM_CARDS_CAROUSEL' to the element_types_accepted (in the get_raw_delivery_items function), catering offers appear but only the ones that appear in main screen of delivery - not all the offers that are available when I click "Catering" button. |
|
Currently, I only use the delivery section, I have few packages in restaurants, so scanning them is unnecessary. What should I comment out in the code so that it does not cron “API_ITEM_ENDPOINT”? In fact, this could also be added to the configuration for in the future. |
Initial Implementation: Delivery Bag Notifications
This PR introduces a feature for receiving notifications related to new Delivery Bags. This is an early implementation, shared to prevent redundant work and foster collaboration. It’s not intended for immediate merging. This has been tested a few scanning runs. It works smoothly but requires more testing before merging. Further discussion is also needed to refine the scope of the feature for this project (CC @Der-Henning )
This PR is a first attempt to solve the following issues:
Resolves #533
Resolves #529
Key Changes
Workflow
Potential Improvements