黄学彪
2019-12-05 b3e96fce4cc01113128ddf8e0a18fc19594a9e56
ZigbeeApp/Shared/Phone/Device/Light/OnOffControl.cs
@@ -2,6 +2,7 @@
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
@@ -236,8 +237,7 @@
            {
                UserHomeView.ReadStatus(light, () =>
                {
                    light.ReadOnOffStatus();
                    light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    ReadDeviceAttributeLogic.Instance.SendLightStatuComand(device.CommonDevice);
                });
            }
            else
@@ -245,8 +245,7 @@
                //防止短时间内多次读取状态
                if (CommonPage.ReadDeviceStatuSpan < (DateTime.Now - light.LastDateTime).TotalSeconds)
                {
                    light.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    light.ReadOnOffStatus();
                    ReadDeviceAttributeLogic.Instance.SendLightStatuComand(device.CommonDevice);
                }
            }