• Professional advice
  • Order before 23.59 uur shipped today
  • Almost always available (+31 73 762 0 762)
  • Monday open late

Fibaro:getGlobalValue command

fibaro:getGlobalValue()

 

Action :

Recieves the value of a global variable defined in the variable panel
This function is part of the following group of funcions
These functions differ only in the returned value.

 

Usage and parameters :

fibaro:getGlobalValue(variablename)

  • variablename : De name of a global variable.

 

Returned value :

The value that is assigned to a variable.
The value returned is in string format, when you want to convert this to a number, you need to use the 
 tonumber() command.

 

Programming example :

-- request the value of a variable.
local waarde = fibaro:getGlobalModificationTime('teller');

-- Perform an action when its more than 10 seconds ago the value is changed
if ((os.time()) tonumber(laatstewijziging) >= 10 then -- The requested value can be used to perform another task.
   fibaro:debug('its more than 10 seconds ago');
else 
   fibaro:debug('its less than 10 seconds ago');
end 

 

See also

fibaro:getValue()
fibaro:getModificationTime()

 

 

 

 

 

 

 

 

 
Customer Service Phone

+31737620762
mon-fri: 10am-5pm and sat 10am-3pm

 
Adress

Gerstakker 16 5236 VG Empel Netherlands

Google maps