From 0bf9e65bc3ba98391e7835c922b15baab3c77876 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 01 六月 2020 14:59:39 +0800
Subject: [PATCH] 上传一个合并的版本

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
index 5203ff7..f02e380 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs
@@ -58,6 +58,8 @@
             this.InitDeviceData();
             //鍒濆鍖栧満鏅�
             this.InitSceneData();
+            //鍒锋柊宸﹁竟鍒锋柊鎴块棿瑙嗗浘鍒楄〃
+            HdlRoomLogic.Current.RefreshRoomListView();
         }
 
         #endregion
@@ -714,8 +716,8 @@
                     this.SetBaseDataToDevice(device, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
                 }
 
-                //1涓户鐢靛櫒
-                var device2 = new ToggleLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 };
+                //1涓皟鍏夊櫒
+                var device2 = new DimmableLight() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 8 };
                 device2.DfunctionType = DeviceFunctionType.A鐏厜;
                 //璁剧疆璁惧鐨勫熀鏈俊鎭�
                 this.SetBaseDataToDevice(device2, 2300, 2300, "MPD0101-ZB.10", i_RoomId);
@@ -912,10 +914,24 @@
             device.ModelIdentifier = ModelIdentifier;
             device.CurrentGateWayId = string.Empty;
 
-            //榛樿姣忎釜璁惧閮藉彲浠ュ畾浣�
+            //榛樿姣忎釜璁惧閮藉彲浠ュ畾浣�,鎷ユ湁寮�鍏冲姛鑳�
             device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 3 });
             device.OutClusterList.Add(new CommonDevice.OutClusterObj { OutCluster = 3 });
-
+            if (device.Type == DeviceType.AirSwitch || device.Type == DeviceType.OnOffOutput
+                || device.Type == DeviceType.DimmableLight || device.Type == DeviceType.ColorDimmableLight)
+            {
+                device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 6 });
+                device.OutClusterList.Add(new CommonDevice.OutClusterObj { OutCluster = 6 });
+            }
+            if (device.Type == DeviceType.OnOffOutput || device.Type == DeviceType.DimmableLight
+                || device.Type == DeviceType.ColorDimmableLight)
+            {
+                device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 8 });
+            }
+            if (device.Type == DeviceType.WindowCoveringDevice)
+            {
+                device.InClusterList.Add(new CommonDevice.InClusterObj { InCluster = 258 });
+            }
             //娣诲姞铏氭嫙璁惧
             LocalDevice.Current.AddVirtualDeviceToMemory(device);
 

--
Gitblit v1.8.0