From a9d1161b1df96e7ddad566335989a1444e433ef5 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 28 三月 2023 11:54:45 +0800
Subject: [PATCH] 2023年03月28日11:52:02

---
 HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index dbba017..850ab99 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -408,7 +408,7 @@
                                         state = function.trait_on_off.curValue.ToString() == "on";
                                     }
                                 }
-                                else if (function.spk == SPK.SenesorMegahealth)
+                                else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose)
                                 {
 
                                     var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
@@ -446,6 +446,14 @@
                                         }
                                     }
                                 }
+                                else if(function.spk == SPK.SensorHelp)
+                                {
+                                    var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus);
+                                    if(tempStatus != null)
+                                    {
+                                        state = tempStatus.curValue.ToString() == "alarm";
+                                    }
+                                }
                                 else
                                 {
                                     state = function.trait_on_off.curValue.ToString() == "on";
@@ -466,7 +474,14 @@
                                             {
                                                 if (function.spk != SPK.LightSwitch)
                                                 {
-                                                    btn.Text = function.lastState;
+                                                    if (function.spk == SPK.SensorHelp)
+                                                    {
+                                                        btn.TextID = StringId.InAlarming;
+                                                    }
+                                                    else
+                                                    {
+                                                        btn.Text = function.lastState;
+                                                    }
                                                 }
                                             }
                                         }

--
Gitblit v1.8.0