I would also like to split a string within a rule.
My Powermax binding gives a status from the ITEM here.
String Powermax_LCD “System LCD Display [%s]” (GPowerMax) {powermax=“partition_status”}
this returns a value like.
Disarmed, Ready, Violated (Motion) in Zone 2
Wanted to split this into 3 Items
String AlarmLCD1 “System LCD Line 1” (GPowerMax)
String AlarmLCD2 “System LCD Line 2” (GPowerMax)
String AlarmLCD3 “System LCD Line 3” (GPowerMax)
I have tried using the following within a rule.
val LCDLines = Powermax_LCD.state.split(“,”)
postUpdate(AlarmLCD1, LCDLines[0])
but this generates errors.
What is the correct way to split a string within a rule.
Thanks.