Open JanTjalling opened 1 year ago
Do you have an address for me to test with?
Postalcode 8333DT Housenumber 25
This is an issue with the waste collectors naming. As the fraction PD is always known as "Plastic en Drankenkarton afval" and not "Los papier". Therefore I'm reluctant to change the mapping of this sensor, because this will change the fraction also for a lot of other people to paper (when it should not).
About handling this issue; I'm not sure what we can do.. You can always change the name yourself in HA, but that will not work for the today and tomorrow sensors.
Hi
If you allow me, I could see 2 directions to work on this: A. Specific to 'ROVA' Wouldn't this be a 'ROVA' wide issue?, and thus in the 'Afvalwijzercollector' make a branch specific for Rova
B. Local setttings file Generic to any collector make a local settings file, that if present overrules the setting in distributed files
Now I made my correction direct in the distributed file and will be overwriten with each update.
Just a thought, happy to test together
I have the same problem with ROVA but how can i solve it?
For me it was solved as of Jan 2024. Rova in my area started reporting paper collection with the right code.
Previously I had edited the API.py file, to chenge the way the returned (incorreclty) code was considered in the API. Correcting for the incorrect usage. I had to apply this fix each time I updated the version - or skip a version :-)
I used a manual API call to find out which code was send https://www.rova.nl/api/waste-calendar/upcoming?postalcode=[POSTALCODE]&houseNumber=[HOUSENUMBER]&addition=&take=5
And use this to correct the code interpretation in API.py
Crude, but effective.
Rova API is sending 'Paper' with garbageType "PD" in json payload. {"index":21,"garbageTypeCode":"PD","garbageType":"Los papier","date":"2023-05-25T00:00:00Z","regular":true}
in API.py PD is defined as WASTE_TYPE_PACKAGES not as WASTE_TYPE_PAPER
Result: Pickup is shown as PMD, not Paper and the calendar also shows this as PMD.
Fix: I believe, not sure of effect on other collectors in "Afvalwijzercollector",
is changeing the waste_type_mapping for 'pd' to WASTE_TYPE_PAPER. At least this is what made it work for me