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
jodohl 9
A bit embarrassed to ask for advice on this, but I seem not to be able to understand the structure of simple IF-tests in HC2 Scenes, regardless whether these are created in the Block editor or LUA.
I need an IF test with the following structure:
....IF ((a AND b) OR (a AND c)) THEN....
Due to the lack of parantheses, I am not able to understand the logical structure of the resulting statement, which in my mind seems confusing
...IF ((a AND b OR c AND b),
I use this code to save electricity on my snow melting mats by twice a day testing whether weather conditions has recently set the variable SNOW to YES in which case mats are turned on for two hours (morning and afternoon) and the variable set back to NO. Seems now my mats turn on twice a day (at times "a" and "c") regardless of the the variable ("b").
Are there any "paranthesis" conventions in LUA I have not understood ?
Link to comment
Share on other sites
5 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.