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

Fibaro:countScenes command

fibaro:countScenes()

 

Action :

Asks the system how many times a scene acive is.

 

Usage and parameters :

fibaro:countScenes()

fibaro:countScenes(sceneID)

  • sceneID: nummeric value – (optional) the scene-ID of which you want to know how many times its active.

 

Returned Value :

A positive number that represents home many times a scene is activated. When no sceneID is given the actual scene is taken.
 

Programming example :

-- Gives a number how many times a scene is active.
local num = fibaro:countScenes() ;
if num == 1 then
   fibaro:debug('Scene is 1 keer actief'); 
else
   fibaro:debug('ik ben ' ..num.. 'keer actief');
end 

--If the scene can only run one time.
if fibaro:countScenes() >1 then
  fibaro:abort();
end

--Displays the number of times that scene 1 is active.
num = fibaro:countScenes(12);
fibaro:debug('scene 12 is' ..num.. ' keer actief.') ;

-- check is scene 12 is active
if fibaro:countScenes((12) >= 1
then
  fibaro:debug('Scene 12 is actief');
else
  fibaro:debug('Scene 12 is niet actief');
end
 

See Also :

fibaro:killScenes
fibaro:startScene

 

 
Customer Service Phone

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

 
Adress

Gerstakker 16 5236 VG Empel Netherlands

Google maps