if (itemXYZ.lastUpdate().compareTo(now.plusSeconds(1).toDate)>0) but it logs "Error during the execution of rule 'rule_name': cannot invoke method public int java.util.Date.compareTo(java.util.Date) on null"
HOw can I further select the state I would like to get the time from? in my use case the time of state change I'd like to retrieve is for OPEN of OFF as my itemXYZ is a Switch or Contact item bound to tinkerforge io16 or lcd_button respectively.
Thanks.
Also, you can simplify your if statement by using updatedSince or changedSince:
I've successfully done this in a rule that I only want to trigger when an item changed five minutes ago or longer.
--
You received this message because you are subscribed to a topic in the Google Groups "openhab" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openhab/R9FQkBnS8xo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openhab+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at http://groups.google.com/group/openhab.
To view this discussion on the web visit https://groups.google.com/d/msgid/openhab/4e8ba025-3333-45aa-bfca-827df4550621%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.