Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for kcm (klikogroep / klikocontainermanager) #361

Merged
merged 9 commits into from
Dec 28, 2024

Conversation

sndrsmnk
Copy link
Contributor

Fixes #337

Other cities using KCM/klikogroep will need code changes.

I haven't (couldn't really) test if this breaks any other collectors. Please apply critical review. But it works for me. 👍

@sndrsmnk
Copy link
Contributor Author

KCM/KlikoGroep calls for a "card number", but i decided to name that field "username", as it could actually be viewed as such. This allows other collectors with the same user/pass requirement to be implemented more cleanly.

@sndrsmnk
Copy link
Contributor Author

sndrsmnk commented Dec 27, 2024

Also, i dont fully understand the result set (getMyWasteCalendar). It returns an array of arrays, which has two items per array, one of which is always 0 (in my case). It could be that different cities collect two types of trash on the same day, perhaps? I dont know how afvalwijzer deals with multiple collection items on one day. This change could introduce that situation

@xirixiz
Copy link
Owner

xirixiz commented Dec 28, 2024

@sndrsmnk thanks for your contribution! I'll do some testing later Today, but my assumption is that it will not break anything.
We'll see if "getMyWasteCalendar" is needed later. People start creating issues anyway when it is really an issue, so don't worry. I`m very happy that you contributed to this project! Many thanks.

@xirixiz xirixiz merged commit 4b8577e into xirixiz:main Dec 28, 2024
2 checks passed
@xirixiz
Copy link
Owner

xirixiz commented Dec 28, 2024

Pre-release created: 2024.12.07-pre.1

@xirixiz
Copy link
Owner

xirixiz commented Dec 28, 2024

Made some improvements/modifications in regards to error handling. But the pre-release seems to be working just fine.
If you can confirm everything is working from your end, I`ll draft a new release.

https://github.com/xirixiz/homeassistant-afvalwijzer/blob/main/custom_components/afvalwijzer/collector/klikogroep.py

@sndrsmnk
Copy link
Contributor Author

Currently running your improved version. Works just fine! I based the entire thing on the ximmio.py collector. ;))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Kliko Container Manager
2 participants