Ok, now it becomes more difficult. I would like to extend this rule for all my windows. So I do not have a state == OPEN , right?
I have 2 Contacts for each Window.
The Items look like this:
Group:Contact:OR(OPEN,CLOSED) gEGContactsKippe âOffene Fenster EG [(%d)]â <window>
Group:Contact:OR(OPEN,CLOSED) gEGContactsOffen âGekippte Fenster EG [(%d)]â <window>
Contact EG_wo_fe_li1 âWohnen Links Auf [MAP(de.map):%s]â <window> (gEGContactsOffen) { channel=âknx:device:bridge:Tasterschnittstellen:EG_wo_fe_li1â }
Contact EG_wo_fe_li2 âWohnen Links Kippe [MAP(de.map):%s]â <window> (gEGContactsKippe) { channel=âknx:device:bridge:Tasterschnittstellen:EG_wo_fe_li2â }
String EG_wo_fe_li âWohnen Links [MAP(de.map):%s]â <contact> (gHFenster, gEG, gEGFenster, gEGContacts, gWO)
Contact EG_wo_fe_re1 âWohnen Rechts Auf [MAP(de.map):%s]â <window> (gEGContactsOffen) { channel=âknx:device:bridge:Tasterschnittstellen:EG_wo_fe_re1â }
Contact EG_wo_fe_re2 âWohnen Rechts Kippe [MAP(de.map):%s]â <window> (gEGContactsKippe) { channel=âknx:device:bridge:Tasterschnittstellen:EG_wo_fe_re2â }
String EG_wo_fe_re âWohnen Rechts [MAP(de.map):%s]â <contact> (gHFenster, gEG, gEGFenster, gEGContacts, gWO)
And there are also rules:
rule Fenster_Wohnen_links
when
Item EG_wo_fe_li2 changed or
Item EG_wo_fe_li1 changed
then
if (EG_wo_fe_li2.state == CLOSED && EG_wo_fe_li1.state == CLOSED) {
EG_wo_fe_li.postUpdate(0)
} else if (EG_wo_fe_li2.state == OPEN && EG_wo_fe_li1.state == CLOSED) {
EG_wo_fe_li.postUpdate(1)
} else {
EG_wo_fe_li.postUpdate(2)
}
end
rule Fenster_Wohnen_rechts
when
Item EG_wo_fe_re2 changed or
Item EG_wo_fe_re1 changed
then
if (EG_wo_fe_re2.state == CLOSED && EG_wo_fe_re1.state == CLOSED) {
EG_wo_fe_re.postUpdate(0)
} else if (EG_wo_fe_re2.state == OPEN && EG_wo_fe_re1.state == CLOSED) {
EG_wo_fe_re.postUpdate(1)
} else {
EG_wo_fe_re.postUpdate(2)
}
end
How can I do this to let Alexa talk if one of this windows is opened when the heat turns on?