Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team

Question
hjelbak 0
Hi
I use a Relay switch 2x1,5 to execute some scenes in my house from a double switch. I have set it to "momentery switch" to turn switch on/ off on both switches, and want to ( in one of the scene's ) to turn off some ligths in the house by pushing it, but in block scenes I don't get the change state option. ( I get the "change state" in magic scenes ). So if the lights are "on" and the switch is "off" I have to push the button twice... When i look at it in LUA I see that it the state is "0" then the scene is executed, but how can i set the parameter to "change state" instead?
It looks like this:
--[[
%% properties
80 value
%% globals
--]]
local startSource = fibaro:getSourceTrigger();
if (
( tonumber(fibaro:getValue(80, "value")) == 0 ) <------- This is the parameter i want to edit to "change state" instead
or
startSource["type"] == "other"
)
then
fibaro:call(58, "turnOff");
fibaro:call(52, "turnOff");
fibaro:call(50, "turnOff");
fibaro:call(56, "turnOff");
fibaro:call(54, "turnOff");
fibaro:call(68, "turnOff");
fibaro:call(31, "turnOff");
fibaro:call(25, "turnOff");
fibaro:call(44, "turnOff");
fibaro:call(27, "turnOff");
end
Thanks!
-KH
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.