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
Lenfors 0
Hello! This is probably a real newbie question, but how do I create a global function?
I have a couple of sceenes triggered by different events, Now I realize they have very much in common so I would like to create a Global function taking some parameters that can be called from all these scenes.
How and where can I define such a function?
Best regards, Mikael
Simple example:
----------------------
-- Scene 1
--[[
%% properties
33 value
–]]
-- Call function and do stuff with Id:s 33, 10, 12 and 14!
CallFunctionDoStuff(33, 10, 12, 14);
---------------------
-- Scene 2
--[[
%% properties
44 value
–]]
-- Call function and do stuff with Id:s 44, 20, 22 and 24!
CallFunctionDoStuff(44, 20, 22, 24);
---------------------
15 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.