--[[
%% properties
%% events
152 CentralSceneEvent
%% globals
--]]
local startSource = fibaro:getSourceTrigger();
local keyId = startSource["event"]["data"]["keyId"]
local keyAttribute = startSource["event"]["data"]["keyAttribute"];
if tonumber(keyId) == 1 and tostring(keyAttribute) == "Pressed" then
elseif tonumber(keyId) == 1 and tostring(keyAttribute) == "Pressed2" then
local startSource = fibaro:getSourceTrigger();
if (
( tonumber(fibaro:getValue(158, "value")) > 0 )
or
startSource["type"] == "other"
)
then
local deviceValue1 = tonumber(fibaro:getValue(155, "value"));
if (deviceValue1 > 0) then
fibaro:call(155, "turnOff");
else
fibaro:call(155, "turnOn");
end
end
elseif tonumber(keyId) == 1 and tostring(keyAttribute) == "Pressed3" then
fibaro:call(65, "turnOff");
fibaro:call(10, "turnOff");
fibaro:call(154, "turnOff");
fibaro:call(155, "turnOff");
end