From eb5a57942bae8eb57fd7fb61124c247bebb67e8e Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期五, 19 六月 2020 10:18:28 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm --- Home0618/Shared/Phone/ZigBee/Device/CommonDevice.cs | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Home0618/Shared/Phone/ZigBee/Device/CommonDevice.cs b/Home0618/Shared/Phone/ZigBee/Device/CommonDevice.cs index 6f9ee2d..c9e23ae 100644 --- a/Home0618/Shared/Phone/ZigBee/Device/CommonDevice.cs +++ b/Home0618/Shared/Phone/ZigBee/Device/CommonDevice.cs @@ -199,12 +199,12 @@ { return null; } - var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.getGatewayBaseInfo != null) && (obj.getGatewayBaseInfo.gwID == CurrentGateWayId)); + var gateWay = ZbGateway.GateWayList.Find(obj => (obj != null) && (obj.GwId == CurrentGateWayId)); if (gateWay == null) { gateWay = new ZbGateway { IsVirtual = true, }; - gateWay.getGatewayBaseInfo.gwID = CurrentGateWayId; - gateWay.getGatewayBaseInfo.HomeId = Shared.Common.Config.Instance.HomeId; + gateWay.GwId = CurrentGateWayId; + gateWay.HomeId = Shared.Common.Config.Instance.HomeId; ZbGateway.GateWayList.Add(gateWay); } @@ -312,6 +312,14 @@ { return Newtonsoft.Json.JsonConvert.DeserializeObject<PMSensor>(strDeviceByte); } + else if (strDeviceType == ZigBee.Device.DeviceType.ColorTemperatureLight.ToString()) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<ColorTemperatureLight>(strDeviceByte); + } + else if (strDeviceType == ZigBee.Device.DeviceType.Buzzer.ToString()) + { + return Newtonsoft.Json.JsonConvert.DeserializeObject<Buzzer>(strDeviceByte); + } else { return null; } //鑳藉皯瀛樹竴涓彉閲忓氨灏戝瓨涓�涓� device.Type = (DeviceType)device.DeviceID; @@ -381,6 +389,11 @@ { //璋冨厜鍣� IconPath = "Device/Light.png"; + } + else if (this.Type == DeviceType.ColorTemperatureLight) + { + //鑹叉俯鐏� + IconPath = "Device/ColorLightTemperature.png"; } else if (this.Type == DeviceType.OnOffOutput) { -- Gitblit v1.8.0