# Group Switch not displaying correct state

**URL:** <https://community.openhab.org/t/group-switch-not-displaying-correct-state/23692>\
**Category:** Items & Sitemaps\
**Created:** [February 23, 2017, 6:52pm UTC](https://community.openhab.org/t/group-switch-not-displaying-correct-state/23692 "2017-02-23T18:52:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daberne](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@daberne](https://community.openhab.org/u/daberne)\
**Post date:** [February 23, 2017, 6:52pm UTC](https://community.openhab.org/t/group-switch-not-displaying-correct-state/23692/1 "2017-02-23T18:52:49Z")

</div>

Hi guys,  
as I’m fairly new to openhab I would like to ask you for some help.

I’ve setup a groupswitch which should be on when any device in the group is on (1 up to all). But its always displayed as offline in the sitemap.

I already found out that the groupswitch is messed up if one item is in multiple groups. Does that sound right?

item:  
 ![](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/f/f73eec16255407b0b5c2677f56f99ff39a011c60.png)

Sitemap:  
Group item=gDeviceOn label=“GerÃ¤t an”

Any help please?

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [February 24, 2017, 5:02pm UTC](https://community.openhab.org/t/group-switch-not-displaying-correct-state/23692/2 "2017-02-24T17:02:49Z")

</div>

I’ve never tried to create a Group (or any Item for that matter)through PaperUI so I don’t know if there is something weird going on with that.

Have you tried “Any ON → ON else OFF” (I’m guessing what the function is named).

Try putting it on your sitempa as `Test item=gDeviceOn label="GerÃ¤t an [%s]"` and see it you can see the proper state that way.

> [@daberne](#):
>
> I already found out that the groupswitch is messed up if one item is in multiple groups. Does that sound right?

That shouldn’t be a problem but I’ve never tried to create Items or Groups in this way so don’t know if there are any limitations.

---

<div class="post-metadata">

**Author:** ![lopez1de](https://community.openhab.org/user_avatar/community.openhab.org/lopez1de/32/42745_2.png) [@lopez1de](https://community.openhab.org/u/lopez1de)\
**Post date:** [February 24, 2017, 5:39pm UTC](https://community.openhab.org/t/group-switch-not-displaying-correct-state/23692/3 "2017-02-24T17:39:55Z")

</div>

> [@daberne](#):
>
> Group item=gDeviceOn label=“GerÃ¤t an”

Don’t get confused with Item Group and Sitemap Group. This are two completely different things. Item Group will group items logically. Sitemap Groups will just group them for displaying purposes.

But this will not solve your problem. I just saying this in case you didn’t know.

I’m in trouble with Group:Switch also. I already opened an issue.  
[https://github.com/eclipse/smarthome/issues/3051](https://github.com/eclipse/smarthome/issues/3051)

---

<div class="post-metadata">

**Author:** ![daberne](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@daberne](https://community.openhab.org/u/daberne)\
**Post date:** [February 24, 2017, 9:32pm UTC](https://community.openhab.org/t/group-switch-not-displaying-correct-state/23692/4 "2017-02-24T21:32:31Z")

</div>

Hi Rich, hi Markus,

thank you for the reply and your help.

to be honest it also seems like a bug to me. I’m trying to set the basic things up with the paperUI but I get more and more clues that I cannot do most things with paperUI without running into some bugs…

It doesn’t matter what I change the group rule to, it seems to always be “undefined” if its items are mixed (on and off both available).

From the paperUI it should be the rule “All OFF → OFF else ON” if I want to have the group ON when any device is on, correct?

---

<div class="post-metadata">

**Author:** ![daberne](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/e47c2d/32.png) [@daberne](https://community.openhab.org/u/daberne)\
**Post date:** [February 25, 2017, 5:49pm UTC](https://community.openhab.org/t/group-switch-not-displaying-correct-state/23692/5 "2017-02-25T17:49:34Z")

</div>

I got some news:

To me it seems to be related to the creation with paperUI. When I create the group in the config file it works fine. To bad ☹ Maybe that issue gets fixed together with your Markus.

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [February 26, 2017, 9:28pm UTC](https://community.openhab.org/t/group-switch-not-displaying-correct-state/23692/6 "2017-02-26T21:28:47Z")

</div>

> [@daberne](#):
>
> From the paperUI it should be the rule “All OFF -\> OFF else ON” if I want to have the group ON when any device is on, correct

Correct. “Any ON -\> ON else OFF” should also work.
