mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
RulesDSL: add triggeringGroup and triggeringGroupName to rule context (#4273)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This commit is contained in:
parent
2aacdcd4e8
commit
9b39f625e8
@ -131,6 +131,10 @@ class RulesJvmModelInferrer extends ScriptJvmModelInferrer {
|
|||||||
rule.toMethod("_" + rule.name, ruleModel.newTypeRef(Void.TYPE)) [
|
rule.toMethod("_" + rule.name, ruleModel.newTypeRef(Void.TYPE)) [
|
||||||
static = true
|
static = true
|
||||||
if ((containsCommandTrigger(rule)) || (containsStateChangeTrigger(rule)) || (containsStateUpdateTrigger(rule))) {
|
if ((containsCommandTrigger(rule)) || (containsStateChangeTrigger(rule)) || (containsStateUpdateTrigger(rule))) {
|
||||||
|
val groupTypeRef = ruleModel.newTypeRef(Item)
|
||||||
|
parameters += rule.toParameter(VAR_TRIGGERING_GROUP, groupTypeRef)
|
||||||
|
val groupNameRef = ruleModel.newTypeRef(String)
|
||||||
|
parameters += rule.toParameter(VAR_TRIGGERING_GROUP_NAME, groupNameRef)
|
||||||
val itemTypeRef = ruleModel.newTypeRef(Item)
|
val itemTypeRef = ruleModel.newTypeRef(Item)
|
||||||
parameters += rule.toParameter(VAR_TRIGGERING_ITEM, itemTypeRef)
|
parameters += rule.toParameter(VAR_TRIGGERING_ITEM, itemTypeRef)
|
||||||
val itemNameRef = ruleModel.newTypeRef(String)
|
val itemNameRef = ruleModel.newTypeRef(String)
|
||||||
|
Loading…
Reference in New Issue
Block a user