File: http://svn.grimore.org/configuration-templates/openhab2/apc/rules/apc.rules -
rule "APC UPS Handling" when Item APCRaw changed then val String json = (APCRaw.state as StringType).toString APC_Values.members.forEach [ value | var String name = value.name.replace('APC_','$.') value.postUpdate(transform("JSONPATH", name, json).replaceAll('"','')) ] end