Problem Creating Group items!

Good evening everyone

I am trying to create a Group in my items file so I can for instance turn all lights of with one switch but when I type Group then the name I want, the Item isn’t highlighted as if it doesn’t recognise it as a Group item. I’m running 2.3.0.1 and fully updated apt. Also could somebody give me example of how the sitemap should look and how the items file should look with items added to said group?

Thank you in advance

items:

Group   gAll
Group:Switch:OR(ON, OFF)        gLights         "All Lights [(%d)]"             <light>         (gAll)
Group:Switch:OR(ON, OFF)        gGF_Lights      "Ground Floor Lights [(%d)]"    <light>         (gLights)
Group:Switch:OR(ON, OFF)        gFF_Lights      "First Floor Lights [(%d)]"     <light>         (gLights)
Switch ...... (gGF_Lights)

sitemap:

Frame 	{
		Text label="Master Lights Control" icon="light" {
			Switch item=gGF_Lights mappings=[OFF="G.All OFF"]
			Switch item=gGF_Lights mappings=[ON="G.All ON"]
			Switch item=gFF_Lights mappings=[OFF="F.All Off"]
			Switch item=gFF_Lights mappings=[ON="F.All ON"]
		}
}

or simpler sitemap entries:

Switch item=gGF_Lights
Switch item=gFF_Lights

Read more on:

  1. https://www.openhab.org/docs/concepts/items.html#group-items
  2. https://www.openhab.org/docs/configuration/sitemaps.html

When I input your code into my items files the Group doesn’t highlight?

why do you care about nano text editor syntax highlighting ? :slight_smile:
Obviously, the highlighting definitions do not include an option for Group (you can fix this if you want)
Are you accessing your Linux from your mobile? :slight_smile:

Use a more powerful tool for syntax checking: Editors | openHAB

here you are: https://www.openhab.org/docs/configuration/editors.html#nano :smiley:

Thank you Dim I will get vs studio tomorrow on my laptop and try it all again. I’ll let you know how i get on

1 Like