From 38ab16c66df6fc523f2c385fd583a2f2e86a781c Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 29 四月 2020 17:58:45 +0800
Subject: [PATCH] 2020-4-29-1

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs |   50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
index 653e1d9..bc94bb7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
@@ -236,6 +236,56 @@
 
         #endregion
 
+        #region 鈻� 鏂伴_______________________________
+        /// <summary>
+        /// SendFreshAirStatuComand
+        /// </summary>
+        /// <param name="device">璁惧</param>
+        public void SendFreshAirStatuComand(CommonDevice device)
+        {
+            if (device == null)
+            {
+                return;
+            }
+            new System.Threading.Thread(() =>
+            {
+                SendFreshAirFanStatuComand(device);
+                System.Threading.Thread.Sleep(300);
+            })
+            { IsBackground = true }.Start();
+        }
+
+        /// <summary>
+        /// SendFanStatuComand
+        /// </summary>
+        /// <param name="device">璁惧</param>
+        private void SendFreshAirFanStatuComand(CommonDevice device)
+        {
+            if (device == null)
+            {
+                return;
+            }
+            var jObject = new Newtonsoft.Json.Linq.JObject
+            {
+                { "DeviceAddr",device.DeviceAddr },
+                { "Epoint", device.DeviceEpoint },
+                { "Cluster_ID", (int)Cluster_ID.FanControl },
+                { "Command", 108 }
+            };
+            var attriBute = new Newtonsoft.Json.Linq.JArray
+            {
+               new Newtonsoft.Json.Linq.JObject
+               {
+                 { "AttriButeId", (int)AttriButeId.FanMode}
+               }
+            };
+            var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
+            jObject.Add("Data", data);
+            device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
+        }
+
+        #endregion
+
         #region 鈻� 绐楀笜_______________________________
         /// <summary>
         /// 鍙戦�佽幏鍙栫獥甯樼姸鎬佸懡浠�

--
Gitblit v1.8.0