Skip to content

feat(OpenCities): carry each service's note through as the collection description - #7325

Open
CRZTFR wants to merge 1 commit into
mampfes:masterfrom
CRZTFR:fix/opencities-note-description
Open

feat(OpenCities): carry each service's note through as the collection description#7325
CRZTFR wants to merge 1 commit into
mampfes:masterfrom
CRZTFR:fix/opencities-note-description

Conversation

@CRZTFR

@CRZTFR CRZTFR commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The wasteservices widget answers with one next date per service and puts the service's cadence in prose beside it. The shared parser reads the <h3> and .next-service and drops the .note, so that sentence never reaches Home Assistant — even though it is the only statement of the cadence anywhere in the response.

Real note text, captured 2026-09-07:

Council Note
Shoalhaven Collected fortnightly. Place bin on the kerb before the morning of collection.
Monash Collected fortnightly. Your next collection day is:
Gold Coast Collected weekly Your next collection date:
Whittlesea (Glass) Collected every four weeks Your next collection date is on:
Maroondah Recyclables (blue lid) are collected every 2 weeks. Your next collection date is:
Ballina Fortnightly collection in Urban and Rural areas. See below for your next landfill bin collection or
Willoughby Same day each week Find out more about this service Your next service will be:

Passing it through as description puts it on the calendar event and the sensor attributes, where HA already renders descriptions, and lets a consumer that needs a recurrence rule read the interval from the council's own words rather than inferring "weekly" from a lone date.

Willoughby rebuilds its Collections to normalise the type names, so it takes one extra line to keep the description it now receives.

Behaviour

No dates and no types change. Deployments with no .note div (Ryde, Logan) or a note that is just a label (Banyule: Recycling) behave exactly as before.

Testing

Verified live against ballina, banyule, goldcoast, logan, maroondah, monash, ryde, shoalhaven, whittlesea and willoughby — same entry counts as before, descriptions present wherever the council writes a note. pytest tests/test_source_components.py passes (35 passed); ruff check and ruff format --check clean.

… description

The wasteservices widget answers with one next date per service and puts the
service's cadence in prose beside it -- "Collected fortnightly. Place bin on
the kerb before the morning of collection." (Shoalhaven), "Collected every
four weeks" (Whittlesea Glass), "Recyclables (blue lid) are collected every 2
weeks." (Maroondah), "Same day each week" (Willoughby). Since the API gives
only that single date, the note is the only statement of the cadence anywhere
in the response, and the shared parser was dropping it.

Passing it through as `description` puts it on the calendar event and the
sensor attributes, where HA already renders descriptions, and lets a consumer
that needs a recurrence rule read the interval from the council's own words
instead of inferring "weekly" from one date.

No dates or types change, and a deployment with no note div behaves exactly as
before (Ryde, Logan and Banyule have none). Willoughby rebuilds its
Collections to normalise the type names, so it needs the one extra line to
keep the description it now receives.

Verified live against ballina, banyule, goldcoast, logan, maroondah, monash,
ryde, shoalhaven, whittlesea and willoughby: same entry counts as before,
descriptions present wherever the council writes a note.
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.

1 participant