Ejemplo n.º 1
0
        private void OnDoorSensor(object sender, NexaEvent nexaEvent)
        {
            Log.Debug("Door sensor");

            // On
            if (nexaEvent.Value)
            {
                if (mMode != null && mMode.CurrentMode == mModeAway)
                {
                    if (!TimeHelper.IsDay)
                    {
                        mLampHallway.SwitchDevice(true);
                    }

                    if (mGalaxyS7 != null)
                    {
                        mGalaxyS7.CheckDevice();      // Trigger scan
                    }
                }
            }
        }