コード例 #1
0
        public IHttpActionResult SetLightingScene(LightSceneEntity lightscene)
        {
            LightSceneEntity lightScenetemp = new LightSceneEntity();

            lightscene.Value = EnumConstants.GetEnumValueFromDescription <LightSceneEnum>(lightscene.LightScene).ToString();
            var lightScene   = BackNetWriteAction.SetConfLightScene(lightscene);
            var lightLevel   = BackNetReadAction.GetConfLightLevel(lightscene.DeviceID);
            var deviceDetail = new DeviceDetailEnity
            {
                DeviceID        = lightScene.DeviceID,
                LightScene      = lightScene.LightScene,
                LightSceneValue = lightScene.Value,
                LightLevel      = lightLevel.LightLevel,
                //LightState = lightState.LightState
            };

            return(Ok(deviceDetail));
        }
コード例 #2
0
        public IHttpActionResult SetConfLightScene(LightSceneEntity lightSceneEntity)
        {
            var lightLevel = BackNetWriteAction.SetConfLightScene(lightSceneEntity);

            return(Ok(lightLevel));
        }