Since it is very simple to set the Fibaro Button in the Fibaro control units (either HC2 or HCL) using the so-called Magic Scenes, in this short blog we will show you how to use the LUA language and the Fibaro Button together.
If you prefer the LUA scripting language, this short manual is for you.
--[[ %% properties %% events 1329 CentralSceneEvent %% globals --]] -- 1329 ID vasho Fibaro Button zariadenia local button_source = fibaro:getSourceTrigger()["event"]["data"] if (tostring(button_source["keyAttribute"]) == "Pressed") then fibaro:debug('Fibaro Button bolo 1x stlačené.') -- po odkomentovani sa spusti scena s ID 11 (ID sceny zmente) --fibaro:startScene(11) elseif (tostring(button_source["keyAttribute"]) == "Pressed2") then fibaro:debug('Fibaro Button bolo 2x stlačené.') --fibaro:startScene(12) elseif (tostring(button_source["keyAttribute"]) == "Pressed3") then fibaro:debug('Fibaro Button bolo 3x stlačené.') --fibaro:startScene(13) elseif (tostring(button_source["keyAttribute"]) == "Pressed4") then fibaro:debug('Fibaro Button bolo 4x stlačené.') --fibaro:startScene(14) elseif (tostring(button_source["keyAttribute"]) == "Pressed5") then fibaro:debug('Fibaro Button bolo 5x stlačené.') --fibaro:startScene(15) elseif (tostring(button_source["keyAttribute"]) == "HeldDown") then fibaro:debug('Fibaro Button bolo podržané.') --fibaro:startScene(16) end