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
Didytz 0
Hi,
I am still trying to learn LUA. I tried to follow few examples from internet but I still don't understand few things, so would appreciate if someone could clarify me following:
1) Can I write and paste somewhere in my hub code like this:
Please login or register to see this code.
or I must follow DECLARATIONS (Conditions/Triggers) - > ACTIONS
2) If I must use DECLARATIONS / ACTIONS is it allowed to put condition in action part. If it is allowed what is format?
I try to control heating by opening/closing windows and want to turn on heating only if it was ON before windows were open and to keep it OFF if it was OFF before windows opening.
Is this valid "ACTIONS" code:
Please login or register to see this code.
As I am not able to set variable like this. I try to get Walli output state into variable at the moment of the windows opening. If this is possible then I would not need condition in ACTIONS.
3) When I translate block scene to LUA, why I see "hub.*" instead of "fibar.*" as it is in every example.
Sorry for mix of all kind questions but I just can't progress in learning without clearing this.
Link to comment
Share on other sites
2 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.