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”