The garbage_collection
component is a Home Assistant custom sensor for scheduling/monitoring regular garbage collection. The sensor can be configured for weekly schedule (including multiple collection days), bi-weekly (in even or odd weeks), monthly schedule (nth day each month), or annual (e.g. birthdays). You can also configure seasonal calendars (e.g. for bio-waste collection) by configuring the first and last month, and you can also group entities, which will merge multiple schedules into one sensor.
Look to the repository for examples of Lovelace configuration.
There are 2 ways to configure the integration:
- Using Config Flow: in
Configuration/Integrations
click on the+
button, selectGarbage Collection
and configure the sensor (prefered). If you configure Garbage Collection using Config Flow, you can change the entity_name, name and change the sensor parameters from the Integrations configuration. The changes are instant and do not require HA restart. - Using YAML: add
garbage_collection
integration in yourconfiguration.yaml
and add individual sensors. Example:
# Example configuration.yaml entry
garbage_collection:
sensors:
- name: Waste # Each week on Wednesday
frequency: "weekly"
collection_days: wed
- name: Bio # Each week on Wednesday
frequency: "odd-weeks"
collection_days: thu
first_month: "mar"
last_month: "nov"
- name: Large Waste
frequency: "monthly"
collection_days: sat
weekday_order_number: 1
- name: 'Someone's birthday'
frequency: 'annual'
date: '11/24'
For more examples and configuration documentation check the repository file
The state can be one of
Value | Meaning |
---|---|
0 | Collection is today |
1 | Collection is tomorrow |
2 | Collection is later |
If the verbose_state
parameter is set, it will show date and remaining days, for example "Today" or "Tomorrow" or "on 2019-09-10, in 2 days"
Attribute | Description |
---|---|
next_date |
The date of next collection |
days |
Days till the next collection |