Persistence Extensions in Scripts and Rules

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?

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