[SOLVED] Lights Rule - Group OFF - One Thing is offline

I have a group of lights and the group setting is “One ON -> ON else OFF”.
If I turn on the lights the switch goes to “ON”. Correct.
Now one light goes offline.

If I turn now the lights OFF the switch is jumping to OFF and afterwards again to ON.
The problem is only if one light is offline in this group.

How can I solve this?

This is my sitemap entry for this switch/group:
Switch item=gOfficeLights label="Büro Licht" mappings=[ON="EIN", OFF="AUS"] icon="light"

Group Item:

What state does your Item go to when the light goes offline?

What state does the Group go to? (See events.log)

The item state is still “ON” because it was ON until the hardware switch has set the light offline.
The group is also “ON” because it was also ON before.


So for understanding:
The last status is the correct status in OpenHab, but the problem is that if one device is now offline the group shows the light/item as ON.

In my oppinion the item should get the status “not reachable” or “offline” and should not count to the group.
So the group should only see the “online” items/things.

Unfortunately, your opinion isn’t how OH works. And there are reasons why this is the case (tl;dr not every technology that OH works with provides any feedback, let alone whether a device is online or offline).

What you can do is write a Rule that triggers when one of those Channels goes offline and set the Item to OFF, or more properly UNDEF.

1 Like

OK thanks for the info.
Does it work to update the item to OFF/UNDEF if the thing is still offline?

You can set the Item to anything you want to independent of what the Thing is doing. If you postUpdate it only changes the Item’s state internal to OH. If you sendCommand, that causes the command to be sent on to the device. The Item may or may not change to the same state depending on whether autoUpdate is set to true (default) or false. This is because some technologies/devices will actively report back the new state of the device in which case you don’t want your Item to change to the new state until the device confirms it has entered that state. Other technologies do not report back so we have to assume that it entered the new state.