Not getting the results I expected

I have a number of Hue Dimmers around my house and would like to get the last event from them, so created a group and the rule below.

I’m getting the following error in my logs. Where have a I gone wrong?

2020-04-08 17:06:18.608 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Which Hue Dimmer and Event': An error occurred during the script execution: index=0, size=0

val String filename = "Hue_Dimmers.rules"

rule "Which Hue Dimmer and Event"
    Member of gAllHueDimmers received update
if(previousState == NULL) return;
val vLocation ="_").get(0)
val vStatus = triggeringItem.state
logInfo(filename, "Hue Dimmer: Status is {}.", vStatus.toString)
logInfo(filename, "Hue Dimmer: Event Location is {}.", vLocation.toString)

I don’t think you get previousState unless there is a changed trigger.

When the implicit variables are not available, you don’t get null content, they simply don’t exist.

1 Like

Top man @rossko57. Thanks for your suggestion and replying so quickly.