Library of Functions


Description


Gets information about the type of trigger that caused the current scene to run.

Usage and Arguments


fibaro:getSourceTriggerType()

  • This function takes no arguments.

Returned Values


A string containing the type of trigger which caused the current scene to run.

This function is the equivalent to calling fibaro:getSourceTrigger() and inspecting the ‘type’ field returned.

Examples


-- Check if the scene has been started manually.
if (fibaro:getSourceTriggerType() == 'other') then
  fibaro:debug('Scene started manually.')
end
 
-- The same can be achieved by downloading the entire table using
-- fibaro:getSourceTrigger() and referring to the field 'type'
local source = fibaro:getSourceTrigger()
 
if (source['type'] == 'other') then
  fibaro:debug('Scene started manually.')
end

See Also


fibaro:getSourceTrigger