TrashCard - 根据您的日历条目显示下一次将收集哪种垃圾
TrashCard is a custom Home Assistant card that displays the your current and upcoming trash collection schedule. It uses events contained within the local calendar integration to display the information.
Features
TrashCard requires:
Once you have both of these installed, you can install TashCard either:
TrashCard is available in HACS (Home Assistant Community Store).
trashcard.js from the GitHub repository.trashcard.js into your config/www folder.You must then add a reference to trashcard.js in your Dashboard. There are two methods for doing this:
Using the UI:
/local/trashcard.js → Set Resource type as JavaScript Module.Note: If you do not see the Resources menu, you will need to enable Advanced Mode in your User Profile
Using YAML:
Add following code to the lovelace section in configuration.yaml:
```yaml
resources:
- url: /local/trashcard.js
type: module
```In order for TrashCard to display information, your garbage collection schedule needs to be added in the local calendar. Creating a dedicated “Garbage collection” calendar for this purpose is a good way to keep things organised.
Note:
The TrashCard cards can be configured using the Dashboard UI editor.
All the options listed below are available in the lovelace editor, but configuring via yaml is supported too.
| Name | Type | Default | Description |
|---|---|---|---|
entities |
array of strings | Required | The calendar(s) containing the collection events. |
layout |
string | Optional | Layout of the card. Vertical, horizontal and default layouts are supported. |
fill_container |
boolean | false |
Fill container or not. Useful when card is in a grid, vertical or horizontal layout. |
filter_events |
boolean | false |
Filter and display events from the calendar by names (if at least one is defined). |
full_size |
boolean | false |
Show the card without the default card margins. |
drop_todayevents_from |
time | 10:00:00 |
From what time to hide all-day event (Format hh:mm:ss). |
use_summary |
boolean | false |
Shows the event summary instead of matched label. |
hide_time_range |
boolean | false |
Option to hide the time on events that aren't full day events. |
event_grouping |
boolean | true |
Only display the next event per pattern, otherwise all events during the selected time will be displayed. |
next_days |
number | 2 | How many times the card will look into the future to find the next event. |
day_style |
default or counter |
default |
Option for how the date of an event should be displayed. default shows the date in date format and counter shows the number of days remaining before the event. |
card_style |
card, chip or icon |
card |
Switch between the events style Standard card, Chip card or a new Icon predefined layout. |
alignment_style |
left, center, right or space |
left |
Switch between alignments on Chip card card_style. |
color_mode |
background or icon |
background |
Select whether the color settings should be applied to the background or to the icon. |
refresh_rate |
integer | 60 | Check for changes in the calendar every x minutes. By default it will check every 60 minutes. Values can be set from 5 to 1440. |
debug |
boolean | false |
Option to enable debug mode to help fixing bugs ;) . |
icon_size |
integer | 40 | Size of the icons in px if you choose card_style as icon . |
with_label |
boolean | true |
Option to display the label in the card or chip style. |
pattern |
array of Pattern | Required | Pattern to detect the kind of trash and how to display it. |
| Name | Type | Default | Description |
|---|---|---|---|
type |
organic, paper, recycle, waste, others, custom |
Required | Label which should be shown. |
label |
string | Required | The label that will be displayed. |
icon |
string | Required | The icon that will be displayed. |
color |
string | Required | The background color of the card. |
pattern |
string | Required | Pattern used to detect and display an event type. (Is tested against the calendar entry title). |
picture |
string | Optional | Picture URL do display an image instead of an icon. |
| Name | Type | Default | Description |
|---|---|---|---|
icon |
string | Required | The icon that will be displayed. |
color |
string | Required | The background color of the card. |
The red and yellow bins are collected every fortnight on Thursdays. The red and green bins are collected every other fortnight on Thursdays.
…暂无开放 Issues,或尚未同步最近议题。