ist there a way to capture the error of previousState() for an item, if the previousState is not available yet.
This does not work (DSL Rule):
if (Item.previousState(true).state !=null) {
}
It gives following error:
// Script execution of rule with UID ‘ae’ failed: cannot invoke method public abstract org.openhab.core.types.State org.openhab.core.persistence.HistoricItem.getState() on null