I have a number of properties (colours) in the root container. I want to change these properties based the properties of various components on the screen. (eg: is a switch open/close)
I know I could write an expression for each colour but a lot of the code would be duplicated. So I want to write a common module for each component type.
So the expression would look a bit like this:
if (app.SC5802.is_1_live(“component”) , color(1,2,3),
if (app.SC5802.is_1_live(“other component”) , color(2,3,4),
My problem is how do I reference the component properties in the module is_1_live() ?