Ascari
(Arancio Vincent)
#1
Hello,
I want to know how I can change the layout of Switch.
Exemple here :
One is the Fibaro Zwave sensor, the other is Xiaomi Zigbee.
I want to have the same layout for the 2.
My migration to OH2 is progressing well but I want to have a clean install.
Thx all for support
gitMiguel
(Miika Jukka)
#2
Can you post those two items definitions side by side?
1 Like
vzorglub
(Vincent Regaud)
#3
And also your sitemap code, merci
vzorglub
(Vincent Regaud)
#5
Try that
Frame label=“Sensors”
{
Group item=Gxiaomi
Group item=gMotion
Switch item=Chambre_smoke
Switch item=Cuisine_smoke
Group item=Beacons
}
vzorglub
(Vincent Regaud)
#7
Ok the second one is due to the binding providing a mapping to the switch.
I don’t have a solution in my head right now. sorry.
gitMiguel
(Miika Jukka)
#8
You could use mappings in the first item: https://www.openhab.org/docs/configuration/sitemaps.html#mappings
So you would map that on/off state to ok/alarm.
1 Like
Ascari
(Arancio Vincent)
#9
Yes it’s works !
But you know if possible to put this device with mapping in a group also ?

Big thx !
vzorglub
(Vincent Regaud)
#10
You do not really want to use group in the sitemap.
You have no control over mappings, no control of the order the items are displayed.
I would recommend that you spend time on your sitemap and build it item by item
Using frames item by item, will help for sure!
Ascari
(Arancio Vincent)
#12
Noted, thank you
I take your advice and I learn.
Thank you
1 Like
gitMiguel
(Miika Jukka)
#13
+1 on this 
It takes a while to construct it but I’m sure it’s worth it.
1 Like