From 351bdda734832d821a9764b0cde8be5d83c4ec50 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 01 十二月 2022 09:56:25 +0800
Subject: [PATCH] 2022年12月01日09:56:23
---
ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs | 38 ++++++++++++++++++++++++++++++++------
1 files changed, 32 insertions(+), 6 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
index a3b8f47..55ae1c5 100755
--- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs
@@ -496,6 +496,11 @@
{
cardContr = new Controls.DeviceCurtainRowControl();
}
+ //鏅捐。鏋� Airer
+ if (device.Type == DeviceType.Airer)
+ {
+ cardContr = new Controls.DeviceAirerRowControl();
+ }
//缁х數鍣�
else if (device.Type == DeviceType.OnOffOutput)
{
@@ -521,6 +526,22 @@
{
cardContr = new Controls.DevicePmSensorRowControl();
}
+ // 绌烘皵璐ㄩ噺浼犳劅鍣�
+ else if (device.Type == DeviceType.TemperatureSensor)
+ {
+ //鑾峰彇璁惧绫诲瀷
+ var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+ //绌烘皵璐ㄩ噺浼犳劅鍣�
+ if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
+ {
+ cardContr = new Controls.DeviceAirQualitySensorRowControl();
+ }
+ else
+ {
+ //娓╂箍搴�
+ cardContr = new Controls.DeviceTemperatureRowControl();
+ }
+ }
//褰╃伅(璋冨厜鍣�)
else if (device.Type == DeviceType.DimmableLight)
{
@@ -530,11 +551,6 @@
else if (device.Type == DeviceType.IASZone)
{
cardContr = new Controls.DeviceSensorRowControl();
- }
- //娓╂箍搴�
- else if (device.Type == DeviceType.TemperatureSensor)
- {
- cardContr = new Controls.DeviceTemperatureRowControl();
}
//闂ㄩ攣
else if (device.Type == DeviceType.DoorLock)
@@ -547,7 +563,7 @@
cardContr = new Controls.DeviceColorTemperatureRowControl();
}
//鏃犳硶璇嗗埆
- else
+ if (cardContr == null)
{
cardContr = new Controls.DeviceRowCommon();
//娌℃湁鐘舵�佸姛鑳�
@@ -843,6 +859,16 @@
{
//澶勭悊涓�鑸澶囩殑涓婃姤鏁版嵁
string mainKeys = LocalDevice.Current.GetDeviceMainKeys(report);
+ //鏅捐。鏋朵笂鎶ラ渶瑕佺壒娈婂鐞嗭紝鍏朵粬涓婃姤鐨勫洖璺粺涓�杞负绔偣1
+ var tempList = LocalDevice.Current.GetDevicesByMac(report.DeviceAddr);
+ if (tempList.Count > 0)
+ {
+ var tempDeviceEnum = LocalDevice.Current.GetMyDeviceEnumInfo(tempList);
+ if (tempDeviceEnum.ConcreteType == Common.DeviceConcreteType.Airer)
+ {
+ mainKeys = report.DeviceAddr + "_" + 1;
+ }
+ }
if (this.dicDeviceRowControl.ContainsKey(mainKeys) == true)
{
//鍒锋柊鍗$墖淇℃伅
--
Gitblit v1.8.0