Library of Functions


Description


Gets the section number in which a device is located.

Usage and Arguments


fibaro:getSectionID(deviceID)

  • deviceID: The identification number of a device

Returned Values


A number which is the number of the section which contains the device (the section ‘Unassigned’ will return a value of 0)

Examples


-- Get the section number which contains the device with id = 10
local section = fibaro:getSectionID(10)
 
if (section == 0) then
  fibaro:debug('The device is not assigned to any section.')
else
  fibaro:debug('The device is in section number ' .. section .. '.')
end

See Also


fibaro:getRoomID

fibaro:getType