fibaro:getGlobal
fibaro:getGlobalValue
fibaro:getGlobalModificationTime
fibaro:getGlobalValue(varName)
A string containing the current value of the global variable.
Please note that this return value is of type string. When comparing it with a variable of type number, use tonumber
to convert it first.
-- Get the value of the 'isNight' global variable
local
value =
fibaro:getGlobalValue
(
'isNight'
)
-- The obtained value can be used to do other things in the scene
if
(value ==
'1'
)
then
fibaro:debug
(
"It's night!"
)
end
fibaro:getGlobal
fibaro:getGlobalModificationTime