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
Momos 103
Hi all,
I'm writing a scene for full automation of windows blinds.
I need to check a value against all the values in a table if it is smaller or not.
So far I have come up with:
local StateAll = { }
StateAll = { value1, value2, value3, value4, value5, valu6, value7, value8, value9, value10, value11}
local Status1= 0
for i = 1, 11 do
if value1<= StateAll then
Status1= Status1+ 1
end
end
if Status1== 11 then
local Trigger1= true
fibaro:setGlobal('Trigger1', true)
else
local Trigger1= false
fibaro:setGlobal(''Trigger1', false)
end
I works but I think it is not the proper way to do that check.
Can anyone suggest an easier code?
Thank you
22 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.