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
Quikdav 15
Hi all
I need some advices regarding a LUA script I would like to write.
I would like to monitor an air sensor using a virtual device and then select the icon depending on the quality of the air. 2 solutions :
- I use the main loop of the virtual device but the main loop is executed each 3 seconds so if I need global variables (to summarize value, first one, last one, etc), I have to create them into the panel Variables and load them each time the main loop is executed (I choose this one but not very conveniente with global variable)
- I use a scene with an infinite loop so I can declare and manage variables only in my scene abd I can change the icon of the virtual device
I don't know what is the best practice in term of performance and ressource
Thanks a lot for your advices
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.