From 65dafd4fde255b9e0bee516345453ea2b3bb2090 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 08 七月 2021 13:37:14 +0800
Subject: [PATCH] 安卓:乐橙闪退处理

---
 HDL_ON/Entity/Function/Function.cs |   25 ++++++++++++++++++++++++-
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 069dd71..15c1e19 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
@@ -1236,6 +1258,7 @@
             spkList.Add(SensorCO2);
             spkList.Add(SensorTVOC);
             spkList.Add(SensorHumidity);
+            spkList.Add(SensorEnvironment);
             return spkList;
         }
         #endregion

--
Gitblit v1.8.0