Hi,
just trying my first rule … will get info when all three doors are open.
Actuall I use only one door-contact for testing purposes; “DoorHouse”. (also in line 5, there will be regular the next door check like “DoorLivingroom” in real).
But why will the if-part (line 5) not take effect, loginfo from line 7 is not executed.
Because the state from DoorHouse is “OPEN” (check line 2 is successful, loginfo from line 4 is executed))
1 -rule "AirFlow"
2- when Item DoorHouse changed from CLOSED to OPEN
3- then
4- logInfo("contact.rules", "Status DoorHouse {}", DoorHouse)
5- if( DoorHouse.state == "OPEN")
6 - {
7 - logInfo("contact.rules", "########################## I'm here - loginfo part ...")
8 - }
9 - end
This is the output from loginfo from line 4:
[smarthome.model.script.contact.rules] - Status DoorHouse DoorHouse (Type=ContactItem, State=OPEN, Label=Haustür, Category=door, Groups=[GF_Hallway])
Hint: I’m a beginner and maybe some mistake with syntax …
I try it also in line 5 with only “DoorHouse” (without ".state) …
Now I have the issue,
when DoorHouse was (allready) open, one minute later next door (DoorLivingroom) opens, the if-part will not reached, because the starting rule in line 2 ("…change from closed to open)" was not true.
Hmmm, but as I find, in the “when” -part it’s not possible to check if all three doors are open ( … && …&& …), this can be only done in a if -part.
How can I check in a correct way if all three doors are open? Shure it’s easy …