From d53f7315de145266e6465d9f95d11d1712b9a91b Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期五, 18 十二月 2020 20:55:28 +0800
Subject: [PATCH] 20201218-6
---
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 35 ++++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 1 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 40949db..ce8b875 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -137,7 +137,6 @@
//鍔犺浇鏁版嵁鐣岄潰鐨勮缃柟娉�(鍒楄〃浜掍笉鑱斿姩)
view.mUIPickerView.setNPicker(temperatureList, null, null);
-
//榛樿鍒濆閫変腑鐘舵��
view.mUIPickerView.setCurrentItems(9, 0, 0);
//瀹氫箟涓�涓眬閮ㄥ彉閲忚褰曢�変腑鏃堕棿
@@ -506,7 +505,41 @@
Output outputDevice = new Output();
outputDevice.target_type = "1";
outputDevice.sid = device.sid;
+
+ switch (device.functionType)
+ {
+ case FunctionType.Dimmer:
+ case FunctionType.RGB:
+ case FunctionType.RGBW:
+ case FunctionType.ColorTemperature:
+ {
+ //璋冨厜鍋氫簡涓�涓壒娈婂鐞嗭紱
+ if (dicSateteList.Count > 1)
+ {
+ foreach (var dictionary in dicSateteList)
+ {
+ string keyValue = dictionary["key"];
+ if (keyValue == "on_off")
+ {
+ if (dictionary["value"] == "off")
+ {
+ //绉婚櫎鍒楄〃鎵�鏈夋暟鎹�
+ dicSateteList.Clear();
+ //閲嶆柊娣诲姞寮�鍏夊睘鎬ф暟鎹�
+ Dictionary<string, string> diction = new Dictionary<string, string>();
+ diction.Add("key", "on_off");
+ diction.Add("value", "off");
+ dicSateteList.Add(diction);
+ break;
+ }
+ }
+ }
+ }
+ break;
+ }
+ }
outputDevice.status = dicSateteList;
+
if (edit)
{
//绉婚櫎鏃ф暟鎹�
--
Gitblit v1.8.0