Dear all, not being too new to the openHab platform I tried to incorporate the GROUP feature, but it doesn’t work properly for me or I don’t understand it correct.
I’ve setup a test in my items file. From that setup I expect that the “testZusammenfassung” Switch is switched on when BOTH Testswitches are on and off if one is not on.
Switch myTestSwitch1 "Test Switch 1" (gTest) ["Switchable"]
Switch myTestSwitch2 "Test Switch 2" (gTest) ["Switchable"]
Group:Switch:AND(ON,OFF) testZusammenfassung "Test Zusammenfassung [%d]" (gTest)
any help is appreciated. I could do this with rules but would like to use this feature instead.
Group:Switch:AND(ON,OFF) testZusammenfassung "Test Zusammenfassung [%d]"
Switch myTestSwitch1 "Test Switch 1" (testZusammenfassung) ["Switchable"]
Switch myTestSwitch2 "Test Switch 2" (testZusammenfassung) ["Switchable"]
Group:Switch:AND(ON,OFF) testZusammenfassung “Test Zusammenfassung [%d]” (gTest) <- this will only make the testZusammenfassung a member of the gTest group.
Ok I see, so the Group gTest isn’t neccessary at all, the Group Switch association is done with naming the group switch with the same name as the Group statet in the Switches themself.
Ok I tried it the same way as described but the Group switch doesn’t show any change, regardless of the states of the two switches
What’s the second group for? The group state depends on the group logic given (Switch:AND in your case) and the items linked to it (that should be the two items).
No need for the second group. But the example from @lfs_alp5 should work, but it does not…
Have you tried restarting OH after editing the group items? In my experience anytime you edit an item (especially groups) you should restart OH to make the changes stick and behave normally.
That was the problem - after restarting OH everything worked as supposed - Thank you!