Ville_qc_collecte is a Home Assistant add-on that scrapes the Ville de Québec Info-Collecte website (using Selenium) to determine the next garbage (ordures/résidus alimentaires) and recycling (recyclage) collection dates. The add-on then publishes these dates as MQTT sensors, making them available in Home Assistant.
- Headless browser (Selenium):
The add-on launches a headless Chromium browser to load the Ville de Québec Info-Collecte page and automatically enters your address. - HTML parsing (BeautifulSoup):
Once the calendar is displayed, the add-on parses the HTML to find upcoming pickup dates for ordures/résidus alimentaires and recyclage. - MQTT sensor publishing:
Using MQTT Discovery, the add-on publishes states and attributes for two sensors:sensor.collecte_ordures
sensor.collecte_recyclage
so Home Assistant can automatically detect and display them.
-
Add this repository to Home Assistant as an Add-on repository:
- Go to Settings → Add-ons → Add-on Store → the three dots menu (⋮) → Repositories → enter this repo's URL.
- Or click the button below:
-
Install the add-on named Ville_qc_collecte from your local add-ons list.
-
Configure the add-on (address to search, update interval, MQTT settings, etc.).
-
Start the add-on and check the logs. You should see it fetching the Info-Collecte calendar and publishing sensor data via MQTT.
Key | Description | Default |
---|---|---|
address |
The address to look up | "123 rue des tulippes" |
update_interval |
How frequently (in seconds) to re-check the Info-Collecte site | 3600 (1 hour) |
mqtt_host |
The MQTT broker hostname | "core-mosquitto" |
mqtt_port |
The MQTT broker port | 1883 |
mqtt_username |
Username for MQTT (if any) | "" |
mqtt_password |
Password for MQTT (if any) | "" |
trigger:
- platform: state
entity_id: sensor.collecte_status
to: "error"
action:
- service: notify.persistent_notification
data:
title: "Ville QC Collecte"
message: "Le scraping a échoué."
- Home Assistant Community – For questions, setup tips, or to share configurations.
- Ville de Québec Info-Collecte – Official site with waste collection schedules.