Hi,
I need help to do something.
I’m trying to monitor the presence of my kid.
He has 2 devices, sometimes leaves the house with only one, sometimes with two. So what I want is - if either one device is missing from wifi, set the group(or proxy item) to OFF. But only if both devices are ON set the group to ON.
Is that even possible? Maybe I dont need a rule, can some groups behave like that by definition?
I found a nice rule for replacement of follow profile, maybe something similar…
rule "Kitchen Strip Button Update"
when
Member of gKitchenStrip changed
then
if(bLock)
return;
bLock = true
gKitchenStrip.members.filter[j|j.name != triggeringItem.name].forEach[i|i.sendCommand(triggeringItem.state.toString)]
Thread::sleep(800)
bLock = false
end
You can achieve this quite easily with a Group using the AND function. In the UI, you can select this aggregation method visually, which makes it very intuitive.
perfect, thank you both! Now I’m embarrassed that I asked for some simple built in function, I guess it sounded more complicated in my head First it took me a while to mentally design the system that would even work for this particular situation, and turns out poof, openhab has me covered.
Fantastic piece of software