| | |
| | | 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(); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | #endregion |