'Friendly' DateTime stateDescriptions?

I have most of my DateTime items using this stateDescription:

%1$tA - %1$tI:%1$tM %1$Tp

Which changes something like this:

  • 2023-03-22T19:41:01.127-0400
    to:
  • Wednesday - 07:41 PM

but I’d love it if there was some magic somewhere that I haven’t been able to find that did something like this:

  • Last Night - 7:41 PM
  • Yesterday - 12:41 PM
  • Last Wednesday
  • More than two weeks ago

If something exists I can’t seem to find the right set of search terms… and it isn’t that important to me and my long to-do list that I’d try to write it myself or customize widgets that do it

Hi

Might not be exactly what you need, but I use this in OH3 using a Widget:

title: = "*** UPS as at " +
    dayjs(items["ShellyUNI_Battery_Updated"].state).fromNow()

Using a DateTime item with State Description of %1$tA %1$tH:%1$tM:%1$tS

1 Like