OH3: expiry function has changed compared to OH2?!

  • openhabian 3.3.0 on rPi4

The expire time is (now) built into OH3.
I have used this feature extensively to issue a command after a set time. expire="2s,command=OFF"
However, I also used to say expire="12m,Zeva Controller is broken". My controllers issue a DHCP maintain query every ten minutes. A heartbeat so to speak. In this case, setting expiry to 12 minutes, this message would then show up on the sitemap, thus alerting me there might be something wrong.

However, implementing this in OH3 works for the time based command, but does not work for the string. If I add a string it takes out the space, regardless whether I use double quotes around it or not .

image

How have people implemented this feature in OH3?
Does it even exist?
Or does it need a work around? (rule?)

Thanks.

Note that issued a state update, not a command, so a closer OH3 equivalent is the update state selection.

It should work with spaces for a String type Item, this may be a UI limitation rather than expire itself.

Thanks; tried and it removes spaces too.

image

I thought I test this with a sitemap entry:

Text item=Zeva_Message  labelcolor=["Zeva_controller_broken"="red"] valuecolor=["Zeva_controller_broken"="red"] visibility=[Zeva_Message=="Zeva_controller_broken"]

… and it works :slight_smile:

Found this: (good ol’ Rich)

Well, I stick to the .sitemap file. :slight_smile: