Skip to content
Stadtreinigung Hamburg - get garbage collection dates in Hamburg - custom component for Home Assistant
Python Shell Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Stadtreinigung Hamburg

Stadtreinigung Hamburg Custom Component

Code style: black Code style: black Hamburg Open Issues Release

This component will set up the following sensors

  • schwarze Restmülltonne
  • blaue Papiertonne
  • gelbe Wertstofftonne/-sack
  • grüne Biotonne
  • Weihnachtsbäume
  • Laubsäcke

The state of these sensors will be the next collection date.



  1. Using the tool of choice open the directory (folder) for your HA configuration (where you find configuration.yaml).
  2. If you do not have a custom_components directory (folder) there, you need to create it.
  3. In the custom_components directory (folder) create a new folder called stadtreinigung_hamburg.
  4. Download all the files from the custom_components/stadtreinigung_hamburg/ directory (folder) in this repository.
  5. Place the files you downloaded in the new directory (folder) you created.
  6. Restart Home Assistant
  7. In the HA UI go to "Configuration" -> "Integrations" click "+" and search for "Stadtreinigung Hamburg"


Below are some use cases for this sensor

Binary Sensor: Garbage Collection Tomorrow

The binary_sensor will be on if the collection is tomorrow:

  - platform: template
        friendly_name: "blaue Papiertonne (morgen)"
        value_template: >-
          {% set collection = as_timestamp(states.sensor.stadtreinigung_hamburg_sesamstrasse_blaue_papiertonne.state)|timestamp_custom("%Y-%m-%d") %}
          {% set tomorrow = (as_timestamp(now()) + 86400)|timestamp_custom("%Y-%m-%d") %}
          {{ collection == tomorrow }}

Do you have some other examples? Make a PR and add it here.

Contributions are welcome!

If you want to contribute to this, please read the Contribution guidelines

You can’t perform that action at this time.