I’d like to maintain an array of counters, where each counter corresponds to a triggeringItem in a group.
Code completion is not working in VS Code, so I have no idea what functions are available for triggeringItem. Is there something available that will work?
A second, broader question is: Is there a document that describes OpenHAB’s language in it’s entirety, with, for example, an entry for triggeringItem that shows all of it’s functions?
The short answer is no, there isn’t. We have https://www.openhab.org/docs/configuration/rules-dsl.html (follow the links on that page too) which documented Rules DSL. And there is a section that talks about what triggeringItem is (an implicit variable that contains the Item that caused the Rule to run). For information about the various Java Objects that might be used in an openHAB Rule, such as GenericItem see the JavaDocs: https://www.openhab.org/javadoc/v2.5.
OK thanks, so I could use a Map<> to store a count for each item in a group. But if I wanted to use an array, I would need an integer index of the triggeringItem within the group. Does this exist?