feat(OpenCities): carry each service's note through as the collection description - #7325
Open
CRZTFR wants to merge 1 commit into
Open
feat(OpenCities): carry each service's note through as the collection description#7325CRZTFR wants to merge 1 commit into
CRZTFR wants to merge 1 commit into
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
wasteserviceswidget 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-serviceand 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:
Collected fortnightly. Place bin on the kerb before the morning of collection.Collected fortnightly. Your next collection day is:Collected weekly Your next collection date:Collected every four weeks Your next collection date is on:Recyclables (blue lid) are collected every 2 weeks. Your next collection date is:Fortnightly collection in Urban and Rural areas. See below for your next landfill bin collection orSame day each week Find out more about this service Your next service will be:Passing it through as
descriptionputs 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
.notediv (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.pypasses (35 passed);ruff checkandruff format --checkclean.