kvisle / oslo_waste

Home Assistant platform for garbage pickup schedule in Oslo
7 stars 3 forks source link

oslo_waste stopped working for my home address #10

Open mrFramstad opened 1 year ago

mrFramstad commented 1 year ago

This component have stopped working for my address Lindbäckveien 1 in Oslo (have been working perfect with same config previously)

Config looks like this: _- platform: oslowaste address: 'LINDBÄCKVEIEN 1'

I get the following error in the log: _Logger: homeassistant.components.sensor Source: custom_components/oslo_waste/sensor.py:59 Integration: Sensor (documentation, issues) First occurred: 3:13:05 PM (1 occurrences) Last logged: 3:13:05 PM

Error while setting up oslo_waste platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/oslo_waste/sensor.py", line 32, in async_setup_platform await ws.async_update() File "/config/custom_components/oslo_waste/sensor.py", line 59, in asyncupdate for v in values: TypeError: 'NoneType' object is not iterable

I suspect the issue might have something to do with getting results for both Lindbäckveien 1 and 1B (https://www.oslo.kommune.no/avfall-og-gjenvinning/nar-hentes-avfallet/), but i get the same result when changing my config to my neighbors address: _- platform: oslowaste address: 'LINDBÄCKVEIEN 1B'

Or could it be something with the enconding of Ä/ä?

sindrebroch commented 1 year ago

Same for me. I think they might have changed the URLs?

sindrebroch commented 1 year ago

I adapted my fork for the new API if anyone is interested. It's still a bit rough and probably needs a little polish, but works for my address.

https://github.com/sindrebroch/oslo_waste

kvisle commented 1 year ago

Since I moved out of Oslo a while back, I have efficiently stopped maintaining this integration.

I think it would probably be better for the users of my integration to migrate to https://github.com/mampfes/hacs_waste_collection_schedule/blob/master/doc/source/oslokommune_no.md which I suspect is both better maintained and using a better interface for acquiring the data (an actual API, it seems - https://github.com/mampfes/hacs_waste_collection_schedule/blob/master/custom_components/waste_collection_schedule/waste_collection_schedule/source/oslokommune_no.py).

@sindrebroch Are you interested in maintaining this integration (i.e. should I point the readme to your repo?) - if not, I will update the README and urge people to migrate to hacs_waste_collection_schedule.

sindrebroch commented 1 year ago

@kvisle Sure, I'll keep my integration working as long as I'm using it myself. Thanks!