[Solved] Rule from OH2 to OH3

Hello, I am in the process of migrating from OH2 to OH3. In OH2 I worked text based, now I configure everything web based. I have a rule that I don’t know how it is implemented in web based.

rule "Taster 1 Diele: Rolladen"
when
    Item mqt239_B6 changed 
then
	if (gRolladenGesamt.state == 0.0)
	{
		gRolladenGesamt.sendCommand("DOWN")
	}
	else
	{
		gRolladenGesamt.sendCommand("UP")
	}
end

The gap I have, is the “If/then/else” because in the GUI I have only “If/then”
Do I have to create two rules?
Can someone guide me in the right direction?

You must have a copy&paste error, as this does not make real sense

Corrected, thanx

You can put this part into a script in your rule, or if just sticking with GUI constructor, divide it into 2 rules with if/then/but only if…

Unfortunately, I don’t know where I would have to integrate the part you quoted into a script. Could you give me a few more details, please? The second variant is clear to me

When designing the rule click add action, other, select run script, select rule DSl and edit script. Paste the quoted part into the editor…

I found it, thank you.