From b8cbf4a8b6910eefcb83b6d3a39e9b5b5a9cd79e Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 10 一月 2020 16:39:22 +0800
Subject: [PATCH] 2019.1.10
---
ZigbeeApp/Shared/Common/DeviceUI.cs | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/ZigbeeApp/Shared/Common/DeviceUI.cs b/ZigbeeApp/Shared/Common/DeviceUI.cs
index d1d9629..e2e697b 100644
--- a/ZigbeeApp/Shared/Common/DeviceUI.cs
+++ b/ZigbeeApp/Shared/Common/DeviceUI.cs
@@ -339,6 +339,10 @@
{
return Language.StringByID(R.MyInternationalizationString.UnallocatedArea);
}
+ if(string.IsNullOrEmpty(room.FloorId))
+ {
+ return room.Name;
+ }
var floorName = Config.Instance.Home.GetFloorNameById(room.FloorId);
if (floorName == null)
{
@@ -532,6 +536,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