This Lovelace custom card displays garbage collection information provided by
the Garbage Collection custom component you may find at
https://github.com/bruxy70/Garbage-Collection.
It will draw your attention the day before the garbage collection by changing the icon color to red by default.
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 the translations directory and put them into
homeassistant_config_dir/www/community/garbage-collection-card/ directory.
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.
**title_size** (optional): font size for the sensor's friendly name. Defaults to 17px.
**details_size** (optional): font size for date and number of days. Defaults to 14px.
When garbage-collection sensors are used with verbose_state=True, hide_date and hide_days will be discarded, taking the information from the sensor's verbose_format.
Please find below an example of ui-lovelace.yaml (entity should be the sensor of garbage_collection platform you defined):
resources:
*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'}
cards:
- 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'