Share Your Device! - Advanced Virtual Devices from Device Capabilities

Control 2 dimmable lights as one


This AVD let’s you control two dimmable lights as if it were one.
When the AVD button is pushed, both lights will be switched on or off.
And when the Dim slider on the AVD is changed, both lights will be set to that dim value.

Also, whenever a light is turned on or off, the AVD will turn it’s button on, when one of the lights is on. When both are off, the OnOff button on the AVD will be Off also.

There are also two Buttons on the buttontab, which shows the OnOff of both light separatly and let’s you control them separatly.


Other things people need to do to get it working correct?

You need the average function in the App Settings–> functions:

Name: average

function () {
  var sum = 0.00;
  for( var i = 0; i < arguments.length; i++ ){
      sum += parseFloat( arguments[i], 10 );
  }
  return sum/arguments.length;
 }


TEF:

[tef:AVD,FLOWS:"H4sIAAAAAAACA8VY2VIbyRL9FYViHuYGrqC2roWIeQAJkGyGHbM4CKJW0dCokdQSi8f/frMlgSwG42ZgPDyA6K7KOpl5MvOUvtZ9GKUutF3erS/VW3zQXp78NJYJ2aNc2vZKU68d7EbaiTc3rUZBRqOdbZ6l/QV2ONjbbhkcpd6lOzf0+Kixv+qa3a31P+W9K3JJpG8So+jFshI092zxfjuY5ZvN9cafo3z7Yrcf75vDjK0LYm8jWRiNekWfHQWeJ+Kwv7m8cpB9bCyOuvsDu3vRurpcvCfbbZcufNZ2fRTsEOPNG7Lb7wVygtnmhuqt+Gbv+HilUxx0r1qiNWzxw7uCtPY7GyeH6XJ75xZ3i6xwWF5dD9uLnbtUNfkJv2pc0uPhwX7zNtsT6ep2c1+6Xuh8Oio+3V+I0dphe+HELx63kntPro4Wdvmi2vHnFx/VybkZLHTBv6OFI9IbDVYWE9oSF+d6awX3bjZ68VpfHI/W7jeui4ZsLhq/s7FxuJZdpRdk82RtjX1qf74oRnHU6t19dq2dA9O97Kn1te1u785fbx7u+QvdgIV7Oyk+38JumA86vd0j01vY2yJWtJaHl/dNzttyb++wt7q+c3/TiK29RlxdbR2vLKzkd5v92O7k2cfj4+XbnqWb/CRdbTd7u907e76zt7bevNnJ+jebo4uD3XYWcrt9cEc+rl/uyc+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