I’ve created a simple rule with the HABmin Rule Designer: If the windows gets opened, the AC will stop.
But instead of when (window open) then (stop AC) the Rule Designer goes for a IF:
rule “Window AC Control”
when
then
if (((AC == ON) && (Window == OPEN))) {
sendCommand(AC, OFF)
…
My question:
Is the when then in front of the if necessary? Can I delete it for a better overview over the code?
Or should I switch to when then instead of the if?
Yes, this section describes the trigger event to run the rule. You don’t have any trigger event at all there, I guess what you would want to use as a trigger is when the window changes to open.
I believe most users use xxx.rules files.
You can use any text editor to edit those.
Many use the VSCode editor, with openHAB extension, which usefully adds syntax checking etc., but is something else to learn and not needed for “my first rule” starting out.
The text rules language in rules files is not the same as NG rules (you’ll see that in PaperUI as “experimental rules engine”) and not the same as node red, blockly, etc.
Ist the HABmin rule designer working in 2.5.2 version or there is still recomendation to not use it? What are the plans for further development immprovements of the rule designer?