Skip to content

[Source Defect]: kungalv_se fails parsing "Jan 2027" as pickup date #7326

Description

@danjlindstrom

Source Name

kungalv_se

What's happening?

The Kungälv source previously worked, but setup now fails while fetching collection data. On 2026-09-07, the source received the string Jan 2027 as next_pickup and attempted to parse it with the strict format %Y-%m-%d.

Expected behavior: the source should ignore headings/non-date values or otherwise handle this provider response without failing the entire update.

Waste Collection Schedule version: 2.32.0
Installation: Home Assistant Container

Error Logs

Logger: custom_components.waste_collection_schedule.waste_collection_schedule.source_shell
Source: custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py:189
Integration: Waste Collection Schedule

fetch failed for source Kungälvs kommun Avfallshantering:

Traceback (most recent call last):
  File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 187, in fetch
    entries: Iterable[Collection] = self._source.fetch()
  File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/kungalv_se.py", line 80, in fetch
    next_pickup_date = datetime.strptime(next_pickup, "%Y-%m-%d").date()
  File "/usr/local/lib/python3.14/_strptime.py", line 555, in _strptime
    raise ValueError("time data %r does not match format %r" % (data_string, format))
ValueError: time data 'Jan 2027' does not match format '%Y-%m-%d'

Source Configuration

Configured through the Home Assistant UI.

Source: kungalv_se
Provider: Kungälvs kommun Avfallshantering

Address-specific parameters omitted for privacy.

Checklist

  • I have tested with the latest version (master branch) via HACS → 3-dot menu → Redownload → select master
  • The service provider's website is still working
  • I have tested with the example parameters from the documentation
  • I have searched past issues (open and closed) for this problem

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    source defectDefect of a source reported

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions