Solved: Display in page only with condition

Hi there,

I have some items , that contain the date of the next garbage pick up, e.g. next time, paper will be picked up is the 26th of march:

I would like to show these on a page only, when the date is tomorrow.

There is the visibility option in the Ad Metadata section:

Can this be used? If so, how?

Many thanks!

Matthias

Start with Building Pages - Components & Widgets | openHAB

You might want to look up:

so the expression for “display if the DateTime item is tomorrow” could be
=dayjs().add(1, 'day').isSame(dayjs(items.YourItem.state), 'day')

so the expression for “display if the DateTime item is today or tomorrow” could be
=dayjs().add(2, 'day').isAfter(dayjs(items.YourItem.state).endOf('day'))

many thanks…it works and that is really powerful!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.