How to use the garbage widget - Julian702/openHAB-widgets GitHub Wiki
You can add a title and a footer to the widget. To display the next collection in the footer, all DateTime items must be added to a group.
Group:DateTime:EARLIEST garbage_collection
Then you only have to add the following line to the configuration.
="Next collection: " + ((dayjs(items.garbage_collection.state).diff(dayjs().startOf("day"), "days")) == 0 ? "Today" : (dayjs(items.garbage_collection.state).diff(dayjs().startOf("day"), "days")) == 1 ? "Tomorrow" : "In " + (dayjs(items.garbage_collection.state).diff(dayjs().startOf("day"), "days")) + " Days")
Now you can add list items by inserting the following structure in the corresponding field.
"<Type of garbage collection>","<color>","<icon>","<name of DateTime item providing the next collection date>"
This could look like this.
"Altpapier","blue","f7:trash","CalDav_Altpapier" | "Bioabfall","teal","f7:trash","CalDav_Bioabfall" | "Restabfall","gray","f7:trash","CalDav_Restabfall" | "Verpackungstonne","yellow","f7:trash","CalDav_Verpackungstonne"
Your widget should now look like this.
This is a modified version of the Garbage Collection widget by Thomas Lauterbach, which can be found in the Add-on Marketplace.