For every line that should be shown in the widget list you will need an item of type DateTime. To get a human readable displayState from this item you will need to apply the state description metadata (Open the item in Main Ui and click ‚Add metadata‘ → select ‚State Description‘. Then fill in the pattern value something like: ‚ %1$tA %1$td.%1$tm.%1$tY‘ and check out the resulting display in the main UI. Please search the forums and/or documentation if you need more help on the pattern syntax. I think there should be plenty of helpful resources around.
I should have updated the first post, sorry for not doing so. Please use the garbage_list_v1 version of the widget that I posted on Jan 26. there is no need for this item anymore. I will update the first post when I find some more time.
I hope this will help you to get on the right track. Please let me know if you got it working!
Add an event filter
3.1 for each type you like to display (e.g. two event filter in case of paper and glass to be displayed)
3.2 with max event == 1
3.4 with a text based filter, e.g. using the subject
3.5 provide the proper subject of the calender entry, e.g. paper or glass
3.6 set Start to 0, as shown here Garbage Collection - #36 by DrRSatzteil
Add an item for each event filter
4.1 Each item is of type DateTime
4.2 Every item is linked to one event filter only
4.3 The used channel is “result_0#begin”
4.4 Adjust the meta description of each item to “%1$tA %1$td.%1$tm.%1$tY” like written here Garbage Collection - #32 by DrRSatzteil. Otherwise, the date in the footer for each type is missing, like here: Garbage Collection - #27 by wars
Now all pre-conditions should be fulfilled, so that the widget can be easily configured as described here Garbage Collection
@Panji
I tried your guide by creating a local calender.ics and save it to the openhab pi. ICalender Binding URL has a local address.
Following your points I end up that all my channel filter items are “UNDEF”.
Regarding search subject i tried the blank name of the event as well as “SUMMARY:Eventname”. ← why this : see an extract of my .ics file:
I also tried both types of the search expression.
Hi i am still trying to make this work but i am stuck with the new item that have the sorted items. i have put all the metadata name and color, i have create a new item (SortedGarbageDateItems) as string?? my question is how to use the new item (SortedGarbageDateItems) in the widget ??
Sure. In the widget configuration popup you should replace the text in the “Date Items” field in the screenshot with =items.SortedGarbageDateItems.state
Yes I was talking about these settings. Ok since these settings are fine another question: where have you put the date format string if not in the state description? Do you use it directly in the widget configuration? I have mine set in the state description and it works fine (as displayState). You may check my posts from may in 2021 above where I shared some screenshots.
I have actually put the same stuff in the state description (see below), but if I put additional Friday=Freitag into the options down there (see below), the entire format is gone and obviously erased:
Ok I see. Yeah you cannot just put a mapping like that in options and I don’t think it makes sense to use this field for date types at all. Unfortunately I have no idea why it stills shows the English string, I did not add any special formatting options, afaik this should just be localised correctly just out of the box. I would recommend to address this question in a separate thread. As this does not seem to be related specifically to this widget you will be more likely getting answers this way.