Skip to content

FKF Budapest Garbage Collection Card for Home Assistant/Lovelace

License

Notifications You must be signed in to change notification settings

amaximus/fkf-garbage-collection-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hacs_badge

Buy me a coffee

FKF Budapest Garbage Collection Card for Home Assistant

This Lovelace custom card displays garbage collection schedule provided by the FKF Garbage Collection custom component you may find at https://github.com/amaximus/fkf-garbage-collection.
It will draw your attention the day before the garbage collection by changing the description to red by default.
When the sensor's last data fetch was unsuccessful, the schedule will be displayed in italic showing data from last successful fetch.

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

Installation

The easiest way to install it is through HACS (Home Assistant Community Store), search for garbage and select FKF Budapest Garbage Collection Card from Plugins.
If you are not using HACS, you may download fkf-garbage-collection-card.js and the translations directory and put them into a directory under homeassistant_config_dir/www/ directory (see install_path parameter below).

Lovelace UI configuration

Configuration parameters:


Name Optional Default Description
entity N - name of the sensor of fkf_garbage_collection platform
due_color Y red description color on due date. Accepts both color names and RGB values
due_1_color Y due_color description color on the day before due date. Accepts both color names and RGB values
hide_before Y false hide entire card until x days before event
hide_date Y false hide date
hide_days Y false hide number of days
hide_text Y false hide description
hide_wday Y false hide weekday
icon_size Y 24px size for icons
install_path Y /hacsfiles/fkf-garbage-collection-card/ local installation path. Defaults to HACS path.
E.g. installed manually under /www in a dedicated directory would require: /local/fkf-garbage-collection-card/
items_number Y 5 number of upcoming collection dates to display
one_icon Y false display only one icon. When both communal and recycle garbage are to be collected, recycle icon will be displayed
title Y empty string card title

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

resources:
  - {type: js, url: '/hacsfiles/fkf-garbage-collection-card/fkf-garbage-collection-card.js'}
    cards:
      - type: custom:fkf-garbage-collection-card
        entity: sensor.my_garbage_schedule
        title: 'My garbage schedule'
        icon_size: 35px

Alternatively, you may go to Dashboard -> Edit Dashboard -> + Add card -> Manual and copy paste the following:

type: custom:fkf-garbage-collection-card
entity: sensor.my_garbage_schedule
title: 'My garbage schedule'
icon_size: 35px

Card with hide_wday=true and items_number=1 in a browser session set to Hungarian locale:
Garbage Collection card example

Card with hide_wday=true and one_icon=true:
Garbage Collection card example