JLChen
2021-08-05 ba275a7b58e56c61820ffccc86571447b2997e52
HDL_ON/DAL/DriverLayer/Control.cs
@@ -434,6 +434,25 @@
                //远程通讯
                else
                {
                    //Bug修复:一端口远程控制调光设备的调光属性时,无法控制到0,反复横跳。
                    //因为On + 远程控制发送给云端使用的是link协议数据,杨涛中转给高胜处理时候逻辑上有冲突,导致无法单独控制亮度值,需要同时发送开关值与亮度值。
                    if (DB_ResidenceData.Instance.GatewayType == 0)
                    {
                        if (commandDictionary.Count == 1)
                        {
                            if (commandDictionary.ContainsKey(FunctionAttributeKey.Brightness))
                            {
                                commandDictionary.Add(FunctionAttributeKey.OnOff, commandDictionary[FunctionAttributeKey.Brightness] == "0" ? "off" : "on");
                            }
                        }
                        if(function.spk == SPK.LightCCT)
                        {
                            if (!commandDictionary.ContainsKey(FunctionAttributeKey.CCT))
                            {
                                commandDictionary.Add(FunctionAttributeKey.CCT, function.GetAttrState(FunctionAttributeKey.CCT));
                            }
                        }
                    }
                    DAL.Server.HttpServerRequest httpServer = new DAL.Server.HttpServerRequest();
                    //ALink控制、Bus控制使用同一个接口控制,由云端负责解析
                    var apiControlData = function.GetApiControlData(commandDictionary);
@@ -902,6 +921,17 @@
                                }
                                EnvironmentalPage.LoadEvent_UpdataStatus(localFunction);
                                break;
                            case SPK.SensorEnvironment:
                                if (localFunction.GetAttributes().Contains(FunctionAttributeKey.Temperature))
                                {
                                    HomePage.LoadEvent_RefreshEnvirIndoorTemp();
                                }
                                if (localFunction.GetAttributes().Contains(FunctionAttributeKey.Humidity))
                                {
                                    HomePage.LoadEvent_RefreshEnvirIndoorHumi();
                                }
                                EnvironmentalPage.LoadEvent_UpdataStatus(localFunction);
                                break;
                            case SPK.ElectricSocket:
                                SocketPage.UpdataState(localFunction);
                                break;