From 2bec9c838d2d688025698de8ec1de401ffd7dd1f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 11 八月 2020 14:13:55 +0800
Subject: [PATCH] 20200811

---
 HDL_ON/Entity/Function/AC.cs |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/HDL_ON/Entity/Function/AC.cs b/HDL_ON/Entity/Function/AC.cs
index 58a9824..d9afb33 100644
--- a/HDL_ON/Entity/Function/AC.cs
+++ b/HDL_ON/Entity/Function/AC.cs
@@ -178,7 +178,11 @@
                 }
             }
         }
+
         Trait _trait_mode;
+        /// <summary>
+        /// 妯″紡灞炴��
+        /// </summary>
         [Newtonsoft.Json.JsonIgnore]
         public Trait trait_mode
         {
@@ -186,7 +190,7 @@
             {
                 if (_trait_mode == null)
                 {
-                    _trait_mode = propertList.Find((obj) => obj.attri == "mode");
+                    _trait_mode = function.Find((obj) => obj.attri == "mode");
                     //鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
                     if (_trait_mode == null)
                     {
@@ -230,7 +234,7 @@
             {
                 if (_trait_fan == null)
                 {
-                    _trait_fan = propertList.Find((obj) => obj.attri == "fan");
+                    _trait_fan = function.Find((obj) => obj.attri == "fan");
                     //鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
                     if (_trait_fan == null)
                     {
@@ -282,7 +286,7 @@
             {
                 if (_trait_swting == null)
                 {
-                    _trait_swting = propertList.Find((obj) => obj.attri == "swting");
+                    _trait_swting = function.Find((obj) => obj.attri == "swting");
                     //鎵句笉鍒板睘鎬ч渶瑕佸0鏄庝竴涓紝闃叉鎶ラ敊闂��
                     if (_trait_swting == null)
                     {
@@ -309,7 +313,6 @@
             {
                 try
                 {
-                   
                     return trait_swting.value;
                 }
                 catch (Exception ex)
@@ -412,8 +415,17 @@
             if (command == CommandType_A.write)
             {
                 sendJob = new JObject { { "Namespace", vendor_code }, { "Command", command.ToString() }, { "Type", "device" } };
-                JObject data = new JObject {{ "sid", sid } };
+                JObject data = new JObject { { "sid", sid } };
                 sendJob.Add("objects", data);
+                List<ControlData> controlData = new List<ControlData>();
+                controlData.Add(new ControlData()
+                {
+                    name = "on_off",
+                    data_type = "Bool",
+                    value = on_off
+                });
+
+
             }
             else if (command == CommandType_A.read)
             {

--
Gitblit v1.8.0