Closed MedicusOne closed 8 months ago
Hi, here is my patch. Please check und test it, because I only rarely work with Phyton. muellabfuhr_de.py_diff.txt
looks fine on first look. Can you create a pull request? Then I will have a more detailed look
I created a pull request
I Have A Problem With:
A specific source
What's Your Problem
The source “muellabfahrt_de.py” only contains the parameters for client and city. However, the client "Saalekreis" needs 2 additional subqueries: client > city > district > street.
Solution: Example for Saalekreis > Kabelsketal > Großkugel > Am Markt
get Client: https://portal.muellabfuhr-deutschland.de/api-portal/mandators {"id":"35","name":"Saalekreis"}
get client config: https://portal.muellabfuhr-deutschland.de/api-portal/mandators/35/config "calendarRootLocationId":"5ca7ca7e-3304-4fe4-933e-58706084dac9"
get city list: https://portal.muellabfuhr-deutschland.de/api-portal/mandators/35/cal/location/5ca7ca7e-3304-4fe4-933e-58706084dac9?includeChildren=true ...,{"id":"140a18d5-76f9-4117-a07e-4f9b1aaec6e7","name":"Kabelsketal","isFinal":false,"children":[]},...
If isFinal is false, we need another request. Here then the district, if configured https://portal.muellabfuhr-deutschland.de/api-portal/mandators/35/cal/location/140a18d5-76f9-4117-a07e-4f9b1aaec6e7?includeChildren=true ...,{"id":"4709579d-3f7f-4aeb-ac90-350535fb035f","name":"Großkugel","isFinal":false,"children":[]},...
If isFinal is false, we need another request. Here then the street, if configured https://portal.muellabfuhr-deutschland.de/api-portal/mandators/35/cal/location/4709579d-3f7f-4aeb-ac90-350535fb035f?includeChildren=true ...,{"id":"d21f9227-7916-4c9d-8814-46dc0c15a7ff","name":"Am Markt","isFinal":true,"children":[]},...
get pickups https://portal.muellabfuhr-deutschland.de/api-portal/mandators/35/cal/location/d21f9227-7916-4c9d-8814-46dc0c15a7ff/pickups
Steps 4 and 5 are currently missing and would have to be implemented as optional. Other destrics from Kabelsketal do not require street information, only step 4. (isFinal is then true)
Source (if relevant)
muellabfuhr_de
Logs
No response
Relevant Configuration
Checklist Source Error
Checklist Sensor Error
Required