I just discovered the OH 2.x variable (
ruleFilename) doesn’t work with OH3.x.
// This must reside at the end of the rule file
rule "Rule File Parsed - default.rules"
Is that documented somewhere?
I know there was talk of it two rules engine versions ago
I’ll make it short. As we all know, the basic structure if a rule is
rule "Control time machine"
<TRIGGER CONDITION1> or
logInfo("myrule", "Control time machine")
Is there any way to use the string for the rule name inside the rule? I often find myself repeating it as shown in the example.
sure that you didn’t use a global variable in your DSL file ?
For 2.5.12 I use a global variable with the name ruleFilename. Wouldn’t that be a naming conflict in case OH 2.5.12 itself would support that name and it is defined as variable in a DSL file ?
You are correct, my bad.
It was a global variable that wasn’t there after me trying to get my v2.4 rule base to run on v3.x and testing with just 1 rule.