| | |
| | | using System.Collections.Generic; |
| | | using Shared.Common; |
| | | using Shared.Phone.Device.CommonForm; |
| | | using Shared.Phone.Device.DeviceLogic; |
| | | using Shared.Phone.UserView; |
| | | using ZigBee.Device; |
| | | namespace Shared.Phone.Device.Light |
| | |
| | | { |
| | | UserHomeView.ReadStatus(light, () => |
| | | { |
| | | light.ReadOnOffStatus(); |
| | | light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); |
| | | ReadDeviceAttributeLogic.Instance.SendLightStatuComand(device.CommonDevice); |
| | | }); |
| | | } |
| | | else |
| | |
| | | //防止短时间内多次读取状态 |
| | | if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - light.LastDateTime).TotalSeconds) |
| | | { |
| | | light.ReadOnOffStatus(); |
| | | light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch); |
| | | ReadDeviceAttributeLogic.Instance.SendLightStatuComand(device.CommonDevice); |
| | | } |
| | | } |
| | | |