From e073fe7864d815379e4b118b9bcb8a935395381f Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 16 十二月 2020 09:07:23 +0800
Subject: [PATCH] 20201216-1

---
 HDL_ON/Entity/Function/Function.cs |   52 +++++++++++++++-------------------------------------
 1 files changed, 15 insertions(+), 37 deletions(-)

diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 0fb021f..7611105 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -149,37 +149,6 @@
         /// </summary>
         public int delay = 0;
         /// <summary>
-        /// 寤舵椂鏄剧ず鐨勬枃鏈�
-        /// </summary>
-        [Newtonsoft.Json.JsonIgnore]
-        public string delayText
-        {
-            get
-            {
-                string text = "";
-                switch (delay)
-                {
-                    case 0:
-                        text = Language.StringByID(StringId.NoDelay);
-                        break;
-                    case 30:
-                        text = "30s";
-                        break;
-                    case 60:
-                        text = "1min";
-                        break;
-                    case 120:
-                        text = "2min";
-                        break;
-                    case 300:
-                        text = "5min";
-                        break;
-                }
-                return text;
-            }
-        }
-
-        /// <summary>
         /// 鏈�鍚庢帶鍒剁殑涓�娆$姸鎬�
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
@@ -222,7 +191,8 @@
         /// <summary>
         /// 浣跨敤棰戠巼
         /// </summary>
-        public double usageFrequency {
+        public double usageFrequency
+        {
             get
             {
                 return usageCount / 7;
@@ -305,7 +275,7 @@
                 Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd);
             }
         }
-      
+
 
         /// <summary>
         /// 杞崲鎴愬満鏅姛鑳藉璞�
@@ -316,7 +286,15 @@
             var sFunc = new SceneFunction();
             foreach (var attr in attributes)
             {
-                sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() });
+                if (attr.key == FunctionAttributeKey.SetTemp)
+                {
+                    var vv = Convert.ToDouble(attr.value);
+                    sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
+                }
+                else
+                {
+                    sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() });
+                }
                 sFunc.sid = this.sid;
             }
             return sFunc;
@@ -455,11 +433,11 @@
         /// <summary>
         /// 鏈�澶у��
         /// </summary>
-        public int max=100;
+        public int max = 100;
         /// <summary>
         /// 鏈�灏忓��
         /// </summary>
-        public int min=0;
+        public int min = 0;
         /// <summary>
         /// 鏁版嵁绫诲瀷
         /// </summary>
@@ -658,4 +636,4 @@
         public const string ElectricFan = "electric.fan";
     }
 
-}
+}
\ No newline at end of file

--
Gitblit v1.8.0