From df2d148a4f7a47e1c2dfea9062e81165a720ab87 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 16 十月 2023 09:36:13 +0800
Subject: [PATCH] 备份

---
 HDL_ON/DAL/DriverLayer/Control.cs |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 1773eb4..ca48600 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -1537,7 +1537,6 @@
                             case SPK.ElectricTuyaWeepRobot2:
                             case SPK.ElectricTuyaWaterValve:
                             case SPK.ElectricTuyaWaterValve2:
-                            case SPK.SensorPir:
                             case SPK.SensorDoorWindow:
                             case SPK.SensorSmoke:
                             case SPK.SensorWater:
@@ -1552,6 +1551,22 @@
                                 //鐘舵�佹洿鏂�
                                 Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
                                 break;
+                            case SPK.SensorPir:
+                            case SPK.SensorPirHold:
+                                var tempPirStatus = localFunction.attributes.Find((sta) => sta.key == "people_status");
+                                if (tempPirStatus != null)
+                                {
+                                    if(tempPirStatus.state == "true")
+                                    {
+                                        localFunction.lastState = Language.StringByID(StringId.Someone);
+                                    }
+                                    else
+                                    {
+                                        localFunction.lastState = Language.StringByID(StringId.wuren);
+                                    }
+                                }
+                                Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
+                                break;
                             case SPK.SenesorMegahealth:
                             case SPK.SenesorMegahealth2:
                             case SPK.SensorMmvPose:

--
Gitblit v1.8.0