But I don’t understand what that means. I also don’t understand what that serviceId is… (And I actually think this doesn’t apply, since .previousState()does return output.)
tl:>dr;
openHAB comes with loads of persitences, usually “rrd4j” is the default one (could depend on your install). rrd4j needs a regular interval to work (everyMinute), so the “previousState” usually is exactly the same as the current state (it gets “muddier” as rrd does some compacting of values over time).
the “persistence id” is the id a persistence has (e.g. “rrd4j” or “jdbc” or whatever your preferred persistence would be).
so, either use a different persistence (you can have more than one active at any time) like MySQL and use the persistence strategy everyChange, which will then result in your .persistence.previousState to give out the “real” previous state.
or use the newly introduced previousState on the item itself. Since OH5 the previous state is also known at item level without the need for persistence: var vorigestatus = items["icloudbinding_cln_afstand_tot_thuis"].previousState;