黄学彪
2020-09-18 c7df85937f73fb347ee0b19e9c052d2d00a6df6c
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceAttributeLogic.cs
@@ -375,7 +375,7 @@
        /// 发送获取灯光状态命令
        /// </summary>
        /// <param name="device">窗帘</param>
        private void SendLevelStatuComand(CommonDevice device)
        public void SendLevelStatuComand(CommonDevice device)
        {
            if (device == null)
            {
@@ -398,6 +398,38 @@
            var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
            jObject.Add("Data", data);
            device.Gateway?.Send(("GetDeviceStatus"), jObject.ToString());
        }
        #endregion
        #region ■ 色温灯_____________________________
        /// <summary>
        /// 发送获取色温灯状态命令
        /// </summary>
        /// <param name="device"></param>
        public void SendColorTemperatureLightStatuComand(CommonDevice device)
        {
            if (device == null)
            {
                return;
            }
            var colorDevice = (ColorTemperatureLight)device;
            new System.Threading.Thread(() =>
            {
                colorDevice.ReadOnOffStatus();
                System.Threading.Thread.Sleep(300);
                colorDevice.ReadLevel();
                System.Threading.Thread.Sleep(300);
                colorDevice.ReadColorTemperature();
                if (LocalDevice.Current.IsMiniLight(device) == true)
                {
                    //mini夜灯需要读取蜂鸣器状态
                    System.Threading.Thread.Sleep(300);
                    colorDevice.ReadBuzzerStatu();
                }
            })
            { IsBackground = true }.Start();
        }
        #endregion