From 42368161d6b795058dfc99ee9774aaf3f69e81d4 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 07 七月 2021 15:24:19 +0800
Subject: [PATCH] 2021-07-07 15:11:03

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

diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 91adfe7..04b4840 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -507,7 +507,25 @@
                             {
                                 attr.curValue = "off";
                             }
-                            else
+                            else if (attr.key == FunctionAttributeKey.Mode )
+                            {
+                                if (DB_ResidenceData.Instance.GatewayType == 0)
+                                {
+                                    attr.curValue = "0";
+                                }
+                                else
+                                {
+                                    if (SPK.AcSpkList().Contains(spk))
+                                    {
+                                        attr.curValue = "cool";
+                                    }
+                                    else if (SPK.FhSpkList().Contains(spk))
+                                    {
+                                        attr.curValue = "day";
+                                    }
+                                }
+                            }
+                            else 
                             {
                                 attr.curValue = "0";
                             }
@@ -516,6 +534,10 @@
                         {
                             double vv = 16;
                             Double.TryParse(attr.curValue.ToString(), out vv);
+                            if (vv == 0)
+                            {
+                                vv = 26;
+                            }
                             sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
                         }
                         else
@@ -1164,7 +1186,7 @@
         /// <summary>
         /// 瓒呭0娉紶鎰熷櫒
         /// </summary>
-        public const string SensoruUtrasonic = "sensor.ultrasonic";
+        public const string SensorUtrasonic = "sensor.ultrasonic";
         /// <summary>
         /// 锛堝共鎺ョ偣锛�
         /// </summary>
@@ -1173,7 +1195,6 @@
         /// 姣背娉紶鎰熷櫒
         /// </summary>
         public const string SenesorMegahealth = "sensor.megahealth";
-
         /// <summary>
         /// 瀹夐槻浼犳劅鍣╯pk鍒楄〃
         /// </summary>
@@ -1217,6 +1238,13 @@
         /// 婀垮害浼犳劅鍣�
         /// </summary>
         public const string SensorHumidity = "sensor.humidity";
+        /// <summary>
+        /// 鐜浼犳劅鍣�
+        /// 鐜妫�娴嬩紶鎰熷櫒
+        /// 鐗规畩绫籹pk
+        /// 璇pk鍔熻兘鏄幆澧冧紶鎰熷櫒鍔熻兘鐨勯泦鎴�
+        /// </summary>
+        public const string SensorEnvironment = "sensor.environment";
 
         /// <summary>
         /// 鐜浼犳劅鍣╯pk鍒楄〃
@@ -1336,7 +1364,6 @@
 
         #endregion
 
-
         #region 璁惧绫�
         /// <summary>
         /// 绾㈠瀹�
@@ -1394,6 +1421,12 @@
         }
         #endregion
 
+        /// <summary>
+        /// 娌℃湁鐘舵�佹樉绀虹殑鍔熻兘spk鍒楄〃
+        /// </summary>
+        public static List<string> NotStatusSpkList = new List<string> {
+            ElectricTV, FanIr, TvIr, TvXmIr, StbIr, PjtIr, IrLearn
+        };
 
         /// <summary>
         /// 绗笁鏂瑰搧鐗屽垪琛�

--
Gitblit v1.8.0