Home Assistant Integration for Saguenay's Waste Collection.
Work in Progress
Supported Features:
- Track the collection dates for garbage, recycling and compost
Recommended: HACS
- Add this repository as a custom repository to HACS:
- Use HACS to install the integration.
- Restart Home Assistant.
- Set up the integration using the UI:
- Using the tool of choice open the directory (folder) for your HA configuration (where you find
configuration.yaml
). - If you do not have a
custom_components
directory (folder) there, you need to create it. - In the
custom_components
directory (folder) create a new folder calledsaguenay_collection
. - Download all the files from the
custom_components/saguenay_collection/
directory (folder) in this repository. - Place the files you downloaded in the new directory (folder) you created.
- Restart Home Assistant
- In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Saguenay Collection Schedule"
To display the next waste collection date as something more user-friendly, I made a YAML template:
{% set t = now() %} # compare with now
{% set midnight = today_at() %}
# convert sensor value as y-m-d to datetime
{% set event_date = as_local(states('sensor.saguenay_récupération_schedule') | as_datetime('%Y-%m-%d')) %}
{% if event_date %}
{% set delta = (event_date - midnight).days %} # get difference in days
{% if delta == 0 %}
Aujourd'hui
{% elif delta == 1 %}
Demain
{% elif delta == 2 %}
Après demain
{% else %}
Dans {{ delta }} jours
{% endif %}
{% else %}
Date invalide
{% endif %}
If you want to contribute to this please read the Contribution guidelines