FANDOM


Returns the Id of the current device.

SyntaxEdit

fibaro:getSelfId()

Input ParametersEdit

none

Output ParametersEdit

number

RemarksEdit

  • It's good practice to use this function instead of hardcoding the number of the device.

ExampleEdit

--[[
%% properties
%% globals
--]]

local ThisDeviceId = fibaro:getSelfId()
fibaro:debug("This devicenumber is :" .. ThisDeviceId)
fibaro:call(2,'turnON')
fibaro:debug("this will turn on device 2 state to on ")