From 412e0af11df2b1d7986adf002e7997d82344ab3e Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期一, 13 七月 2020 09:47:40 +0800
Subject: [PATCH] 请合并最新版代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs
index b33d384..6b6ac40 100644
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSimpleEnvironmentButtonSettionForm.cs
@@ -208,7 +208,10 @@
                     foreach (var bDev in bindList)
                     {
                         var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
-
+                        if (device == null)
+                        {
+                            continue;
+                        }
                         if (device.Type == DeviceType.FreshAir)
                         {
                             //鑾峰彇璁惧绫诲瀷鐨�
@@ -284,6 +287,19 @@
 
                             bindAcDev = device;
                         }
+                        else if (device.Type == DeviceType.PMSensor)
+                        {
+                            if (bDev.BindCluster == 1026)
+                            {
+                                bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
+                                bindTemperatureDev = device;
+                            }
+                            if (bDev.BindCluster == 1029)
+                            {
+                                bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
+                                bindHumidityDev = device;
+                            }
+                        }
                     }
                     count++;
                     if (count == 2)

--
Gitblit v1.8.0