From b186c02eb9e44268727b769be477d1956e97fbb0 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 02 一月 2020 09:08:05 +0800 Subject: [PATCH] 2019.1.2 --- ZigbeeApp/Shared/Common/DeviceUI.cs | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Common/DeviceUI.cs b/ZigbeeApp/Shared/Common/DeviceUI.cs index d1d9629..913102d 100644 --- a/ZigbeeApp/Shared/Common/DeviceUI.cs +++ b/ZigbeeApp/Shared/Common/DeviceUI.cs @@ -532,6 +532,27 @@ } return null; } + else if (device.Type == DeviceType.TemperatureSensor) + { + var tempera = CommonDevice as TemperatureSensor; + if(tempera.SensorDiv==1) + { + if (tempera.Temperatrue == 0) + { + return "--鈩�"; + } + return $"{tempera.Temperatrue}鈩�"; + } + else if(tempera.SensorDiv==2) + { + if (tempera.Humidity == 0) + { + return "--%"; + } + return $"{tempera.Humidity}%"; + } + return null; + } else { return null; -- Gitblit v1.8.0