gxc
2019-11-29 b94f318b1cb5c3618dd53b5240c1d999c8427b71
ZigbeeApp/Shared/Phone/Device/Light/DimmableLightControl.cs
@@ -1,6 +1,7 @@
using System;
using Shared.Common;
using Shared.Phone.Device.CommonForm;
using Shared.Phone.Device.DeviceLogic;
using ZigBee.Device;
namespace Shared.Phone.Device.Light
@@ -246,9 +247,7 @@
                //发送读取状态命令
                UserView.UserHomeView.ReadStatus(dimmableLight, () =>
                {
                    dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    dimmableLight.ReadOnOffStatus();
                    dimmableLight.ReadLevel();
                    ReadDeviceAttributeLogic.Instance.SendDimmableLightStatuComand(device.CommonDevice);
                });
            }
            else
@@ -256,9 +255,7 @@
                //防止短时间内多次读取设备状态
                if ((DateTime.Now - dimmableLight.LastDateTime).TotalSeconds > CommonPage.ReadDeviceStatuSpan)
                {
                    dimmableLight.ReadAttri(Cluster_ID.Identify, AttriButeId.Switch);
                    dimmableLight.ReadOnOffStatus();
                    dimmableLight.ReadLevel();
                    ReadDeviceAttributeLogic.Instance.SendDimmableLightStatuComand(device.CommonDevice);
                }
            }
        }