| | |
| | | } |
| | | if (deviceUI.CommonDevice.Type == DeviceType.AirSwitch) |
| | | { |
| | | if ((common as ZigBee.Device.AirSwitch).DeviceStatusReport.CluterID == 6) |
| | | if (common.DeviceStatusReport.CluterID == 6) |
| | | { |
| | | var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch; |
| | | airSwitch.DeviceStatusReport = (common as ZigBee.Device.AirSwitch).DeviceStatusReport; |
| | | airSwitch.DeviceStatusReport = common.DeviceStatusReport; |
| | | //记录、更新状态 |
| | | if (airSwitch.DeviceStatusReport.AttriBute == null || airSwitch.DeviceStatusReport.AttriBute.Count == 0) |
| | | { |
| | |
| | | airSwitch.LastDateTime = DateTime.Now; |
| | | } |
| | | //***新改***设备状态上报中,当CluterID=3,证明设备在线,直接标记 |
| | | else if ((common as ZigBee.Device.AirSwitch).DeviceStatusReport.CluterID == 3) |
| | | else if (common.DeviceStatusReport.CluterID == 3) |
| | | { |
| | | var airSwitch = deviceUI.CommonDevice as ZigBee.Device.AirSwitch; |
| | | airSwitch.IsOnline = 1; |
| | |
| | | public override void RemoveFromParent() |
| | | { |
| | | ZbGateway.StatusList.Remove(this); |
| | | action(); |
| | | action?.Invoke(); |
| | | RemoveUpdateControlDeviceStatuAction(); |
| | | base.RemoveFromParent(); |
| | | } |
| | |
| | | Shared.Common.Room.Lists[0].AddDevice(device.FileName); |
| | | collectionBtn.IsSelected = true; |
| | | } |
| | | action?.Invoke(); |
| | | } |
| | | |
| | | /// <summary> |