From 2450c12c825ad4d78d1572da2fa421706db2df2f Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 18 六月 2020 16:01:14 +0800 Subject: [PATCH] 新代码 --- ZigbeeApp/Shared/Common/Device.cs | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs index e3891f6..bada159 100755 --- a/ZigbeeApp/Shared/Common/Device.cs +++ b/ZigbeeApp/Shared/Common/Device.cs @@ -2432,7 +2432,7 @@ /// <returns></returns> public bool IsMiniLight(CommonDevice device) { - return device.DeviceAddr == "3737363534333231"; + return device.DriveCode != 0 && device.Type == DeviceType.ColorTemperatureLight; } /// <summary> @@ -2876,6 +2876,7 @@ else if (deviceType == DeviceType.PMSensor) { device = new PMSensor(); } else if (deviceType == DeviceType.FreshAirHumiditySensor) { device = new HumiditySensor(); } else if (deviceType == DeviceType.ColorTemperatureLight) { device = new ColorTemperatureLight(); } + else if (deviceType == DeviceType.Buzzer) { device = new Buzzer(); } else if (deviceType == DeviceType.OtaDevice || deviceType == DeviceType.OtaPanelDevice) { device = new OTADevice(); } else { return null; } -- Gitblit v1.8.0