«
Rule languages supports OpenHAB transformations
14=Arming Away
text = Transformation.transform('MAP','AlarmModes.map',14)
logger.info("#{test} is 14")
14=Arming Away
text = AlarmModes.map(14)
text = AlarmModes[14]
logger.info("#{test} is 14")
type | name | label |
---|---|---|
Number | Alarm_Mode | Alarm Mode |
10=Away
14=Arming Away
rule 'Execute rule when item is changed to specific number using map transform' do
changed Alarm_Mode, to: AlarmModes.map(["Away","Arming Away"])
triggered { |item| logger.info("Alarm Mode Updated #{AlarmModes.map(item)}")}
end