|  Developer
Updated on November 22, 2021

add_setting()

  • Register a setting for a specific device.
Edit
  • params: setting (table). Note, don’t pass field “id” into table. It’s auto-generated.
  • return: setting id (string) or nil if failed to add a setting
Edit
				
					require "core"

local device_id = core.add_device( {...} )
local setting = core.add_setting( { device_id = device_id, ... } )