From 4a69207038ceab77419f15f44ffc2ce1bf85b167 Mon Sep 17 00:00:00 2001 From: Jason T Alborough Date: Fri, 14 Sep 2018 16:55:22 -0400 Subject: [PATCH] ECS-838 Add method to set lighting integrationID from Bridge. --- PepperDashEssentials/Bridges/EssentialsLightsBridge.cs | 7 +++++++ essentials-framework | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/PepperDashEssentials/Bridges/EssentialsLightsBridge.cs b/PepperDashEssentials/Bridges/EssentialsLightsBridge.cs index b22a8b07..7821f378 100644 --- a/PepperDashEssentials/Bridges/EssentialsLightsBridge.cs +++ b/PepperDashEssentials/Bridges/EssentialsLightsBridge.cs @@ -66,11 +66,16 @@ namespace PepperDash.Essentials { comm.CommunicationMonitor.IsOnlineFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[ApiMap.Online]); } + + var lutronLights = Lights as PepperDash.Essentials.Devices.Common.Environment.Lutron.LutronQuantumArea; + ApiEisc.Eisc.SetUShortSigAction(ApiMap.CallPreset, u => Lights.SelectScene(Lights.LightingScenes[u])); + ApiEisc.Eisc.SetStringSigAction(ApiMap.integrationID, (s) => { lutronLights.IntegrationId = s; }); int sceneIndex = 1; foreach (var scene in Lights.LightingScenes) { var tempIndex = sceneIndex - 1; + ApiEisc.Eisc.SetSigTrueAction((uint)(ApiMap.LightingSceneOffset + sceneIndex), () => Lights.SelectScene(Lights.LightingScenes[tempIndex])); scene.IsActiveFeedback.LinkInputSig(ApiEisc.Eisc.BooleanInput[(uint)(ApiMap.LightingSceneOffset + sceneIndex)]); ApiEisc.Eisc.StringInput[(uint)(ApiMap.LightingSceneOffset + sceneIndex)].StringValue = scene.Name; @@ -108,6 +113,8 @@ namespace PepperDash.Essentials public ushort LightingSceneOffset = 10; public ushort ButtonVisibilityOffset = 40; public ushort CallPreset = 1; + + public ushort integrationID = 1; public EssentialsLightsBridgeApiMap() { diff --git a/essentials-framework b/essentials-framework index 7f3782b0..2ce1b084 160000 --- a/essentials-framework +++ b/essentials-framework @@ -1 +1 @@ -Subproject commit 7f3782b03ddebe45df5cf9be9f16d6cf5555a8e2 +Subproject commit 2ce1b0841bf590eb58669fc0b563d58bd310e19d