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