| | |
| | | } |
| | | else |
| | | { |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | if (sceneFunction.localFunction.spk == SPK.ElectricalTvHisense) |
| | | { |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | for(int i = 0;i< sceneFunction.status.Count;i++) |
| | | { |
| | | var tvState = sceneFunction.status[i]; |
| | | if (tvState.key == FunctionAttributeKey.OnOff) |
| | | { |
| | | tvState.key = "wol"; |
| | | tvState.value = "on"; |
| | | } |
| | | else |
| | | { |
| | | if(string.IsNullOrEmpty( tvState.value)) |
| | | { |
| | | sceneFunction.status.RemoveAt(i); |
| | | i--; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful); |
| | | if (isHasColorful != null) |
| | | { |
| | | sceneFunction.status.Remove(isHasColorful); |
| | | } |
| | | } |
| | | } |
| | | } |