|  Developer
Updated on November 22, 2021

add_item()

  • Register an item for a specific device.
Edit
  • params: item (table). Note, don’t pass field “id” into the table.
  • return: item id (string) or nil if failed to add an item.
Edit
				
					require "core"

local device = core.add_device( {...} )
local item = core.add_item( { device_id = device.id, ... } )