There was a question with a similar subject that got solved by changing uppercase/lowercase of a member of the group method.
However in my case, it seems that in my DSL rule, I am unable to access groups that I define with the UI. Groups defined in my item text file do work, but since I have now created a lot of the items via the UI, I wanted to also define the groups in the UI.
The line of code that fails is this:
logInfo(“voice”, MyLights);
Giving an error
2021-01-03 11:08:03.352 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘voice-1’ failed: An error occurred during the script execution: Could not invoke method: org.openhab.core.model.script.actions.Log.logInfo(java.lang.String,java.lang.String,java.lang.Object) on instance: null in voice
The group appears in the UI item list and contains one light:
Is there a trick to get the GUI defined groups in a DSL text-defined rule?