Skip to content
Custom Lovelace card for Garbage Collection custom component
Branch: master
Clone or download
amaximus Merge pull request #7 from mw-white/auto-hide-card
Allow hiding the card until x days before event
Latest commit cd185f8 Sep 16, 2019

Lovelace custom card for Garbage Collection

This Lovelace custom card displays garbage collection information provided by the Garbage Collection custom component you may find at
It will draw your attention the day before the garbage collection by changing the icon color to red.

Lovelace UI does not support platform attributes natively.
Implementation of handling attributes in Lovelace was inspired by entity-attributes-card.


The easiest way to install it is through HACS (Home Assistant Community Store), search for garbage and select Garbage Collection Card from Plugins.
If you are not using HACS, you may download garbage-collection-card.js and put it into homeassistant_config_dir/www.

Lovelace UI configuration

Configuration parameters:

**entity** (required): name of the sensor of garbage_collection platform.
**due_color** (optional): icon color on day before and on due date. Accepts both color names and RGB values. Defaults to red.
**icon_color** (optional): icon color. Accepts both color names and RGB values. Defaults to black.
**icon_size** (optional): size of the icon. Defaults to 25px.
**hide_date** (optional): hide date. Defaults to false.
**hide_days** (optional): hide number of days. Defaults to false.
**hide_before** (optional): hide entire card until x days before event. Defaults to not hiding card.

Please find below an example of ui-lovelace.yaml (entity should be the sensor of garbage_collection platform you defined):

  *When using HACS installation method
  - {type: module, url: '/community_plugin/garbage-collection-card/garbage-collection-card.js'}
  When using manual install method
  - {type: module, url: '/local/garbage-collection-card.js'}
      - type: custom:garbage-collection-card
        entity: sensor.selective_waste
        icon_size: 35px
        icon_color: green
        hide_date: true
      - type: custom:garbage-collection-card
        entity: sensor.waste
        hide_before: 4
        icon_color: '#0561ba'

Normal card:
Garbage Collection card example

Different icon sizes:
Different icon sizes

You can’t perform that action at this time.