Groups and Rooms

Can we set up groups and nest them?

Kitchen Lights = kitchen overhead, sink light
Downstairs Lights = Kitchen Lights + dining room light
Inside Lights = Downstairs Lights + Upstairs Lights.
All Lights = Inside Lights + Outside Lights.

Then, can we use them in meshbots like: Turn off All Lights?

Better Yet:
You already have the concept of Rooms and we can declare which devices are in them. It would be great if I could have different devices in say the Living Room like a few lights, the TV, a motion sensor and a camera. Then a meshbot could be written to ‘turn of the living room lights’ which would use the living room group and just turn of the light devices in that group.

Yes !, we are about to wrap up and release the grouping feature shortly, you will be able to exactly as you described. Create groups and then use them in meshbots.
Please stay tuned !

1 Like

Maybe something like this? I know this works without the >>>

  •  and ( == "room_number") 

require “core”
local items = core.get_items()
if items then
for _, item in ipairs( items ) do
if == “switch” then
local device = core.get_device( item.device_id )
if device and ( device.category == “dimmable_light” or ( device.category == “switch” and ( device.subcategory == “interior_plugin” or device.subcategory == “exterior_plugin” or device.subcategory == “in_wall” ) ) ) and ( == “room_number” ) then
core.set_item_value(, false ) – false turns off, true turns on