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
API Integration: Added API calls to fetch information about delivery bags. Needed endpoint has been found from the relevant Issue discussion.
Data Processing: Introduced logic to read, parse, and convert delivery bag data into Item objects.
Continuous Monitoring: Implemented a monitoring mechanism via self.delivery_state to track the status of delivery items and send notifications if new bags appear.
Add a configuration option to enable/disable this new feature
Workflow
Initial Scan: On startup, the scanner checks all available delivery bags and triggers a notification for each one.
Iterative Checks: During each scan cycle, the system:
Removes bags that are out of stock from self.delivery_state.
Adds the new bags to self.delivery_state and sends notifications for these new items.
Potential Improvements
Enhance notifications with additional details about each delivery bag.
Tag notifications with a "Delivery" label for easier identification.
Send only one notification for all new delivery bags (especially useful for the startup of the scanner)
For the API call, some options in the json data are disabled, because they were not tested yet.
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