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 !
Maybe something like this? I know this works without the >>>
and (device.room == "room_number")
require âcoreâ
local items = core.get_items()
if items then
for _, item in ipairs( items ) do
if item.name == â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 (device.room == âroom_numberâ ) then
core.set_item_value( item.id, false ) â false turns off, true turns on
end
end
end
end
Best Home Automation shopping experience. Shop at Ezlo!