please read the principles of openHAB again here:
with the Garbage Collection widget you have to first install a “icalendar”-Thing as described in your first link. Some Bindings need mor things - and this is the case here. First of you have the “icalendar configuration” thing, which simply provides access to the CalDAV-calendar. Then theres (three of four) things for each of the garbage colour (“icalendar filter” things). Those things filter your garbage calendar for the different kind of garbages - you only have to filter for e.g. the text in the title.
So at the end you have four or five things, and only the filter things have the channels we need to use for the widget:
- Start (at least this one is needed!)
- End
- Title
you open one of those “channels” and add one item at least every “start” channel, so you end up with a minimum of 3 items (each color one item - if you’re not having “gelber Sack” also, which would be #4 then)
In your example you added both “Restmüll” and “Biotonne” Start-channel to one item, you have to have different items!
last of all, you then enter the item-names in the widget with the “datearray”-attribut and the widget does the rest, for example my configuration:
datearray =
'"Restmüll","black","f7:trash","Restmuell_Start"|
"Bioabfall","orange","f7:trash","Biotonne_Start"|
"Gelber Sack","yellow","f7:trash","GelberSack_Start"|
"Altpapier","blue","f7:trash","Altpapier_Start"'
so, as you can see, theres four different sets of information for each “garbage colour”:
- name (first column)
- colour (second column)
- icon (third coloumn)
- item name (fourth column)
then there’s the divider “|” between the set of garbage collection items. you can have a (theoretically) infinite number of garbage collection “Start” items, and the widget would iterate through each of them.
same with the footer-array, for that you need a special filter thing, which only filters for the “next” garbage date (regardless the “colour”) and results in a separate “next garbage collection item”. That item you have to seperately filter and insert in the “footer”-part of the widget. in my case I named the item “naechsteAbfuhr_Start”:
footer: '="Nächste Abfuhr: " +
((dayjs(items.naechsteAbfuhr_Start.state).diff(dayjs().startOf("day"),
"days")) == 0 ? "Heute" :
(dayjs(items.naechsteAbfuhr_Start.state).diff(dayjs().startOf("day"),
"days")) == 1 ? "Morgen" : "In " +
(dayjs(items.naechsteAbfuhr_Start.state).diff(dayjs().startOf("day"),
"days")) + " Tagen")'