| | |
| | | var modeState = status.Find((obj) => obj.key == FunctionAttributeKey.Mode); |
| | | var tempState = status.Find((obj) => obj.key == FunctionAttributeKey.SetTemp); |
| | | var fanState = status.Find((obj) => obj.key == FunctionAttributeKey.FanSpeed); |
| | | ////海信电视状态 |
| | | //var hisenseTvState = status.Find((obj) => obj.key == "wol"); |
| | | //if(hisenseTvState != null) |
| | | //{ |
| | | //} |
| | | if (modeState != null) |
| | | { |
| | | sceneFunctionInfo += modeState.GetValueText() + " "; |
| | |
| | | |
| | | |
| | | #if DEBUG |
| | | var hesTv = new Function() |
| | | { |
| | | sid = "hisense000000000001", |
| | | deviceId = "hisense000000000001", |
| | | name = "海信电视", |
| | | spk = SPK.ElectricalTvHisense, |
| | | |
| | | roomIds = new List<string>() { "1405771024583090178" }, |
| | | attributes = new List<FunctionAttributes>() |
| | | { |
| | | new FunctionAttributes() { key = "on_off",value =new List<string>(){ "off" }, curValue="on",state = "on" }, |
| | | new FunctionAttributes() { key = "wol",value =new List<string>(){ "on" }, curValue="on",state = "on" }, |
| | | } |
| | | }; |
| | | hesTv.SaveFunctionFile(); |
| | | |
| | | |
| | | var airSwitchP3 = new Function() |
| | | { |
| | | sid = "airSwitchP3000000000001", |
| | |
| | | } |
| | | else |
| | | { |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | if (sceneFunction.localFunction.spk == SPK.ElectricalTvHisense) |
| | | { |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | sceneFunction.status.Clear(); |
| | | sceneFunction.status.Add(new SceneFunctionStatus() { key = "wol", value = "on" }); |
| | | } |
| | | else |
| | | { |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | { |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | } |
| | | } |
| | | } |
| | | } |