Persistence Extensions in Scripts and Rules

Tags: #<Tag:0x00007f17523dcc08> #<Tag:0x00007f17523dca50>

Hi all!
Just playing around with the persistence extensions in OH3.
With Numbers it works as it should like


but with contacts i cannot get


to work. It only works when it actually is OPEN, or with previousState().state with the only output: CLOSED
otherwise the error message is:

failed: cannot invoke method public abstract org.openhab.core.types.State org.openhab.core.persistence.HistoricItem.getState() on null

in influxdb it stored everything right with ā€œ0ā€ an ā€œ1ā€

many thx

I would imagine this is a variation on

1 Like

ahh thx!

Are you able to analyze your switches, contacts in the UI?