wei
2021-07-09 6e8dba90956d7068df68144aa4c6d1189e596255
HDL_ON/DAL/DriverLayer/Control.cs
@@ -359,15 +359,6 @@
                    }
                }
            }
            //Bug修复:一端口远程控制调光设备的调光属性时,无法控制到0,反复横跳。
            //因为On + 远程控制发送给云端使用的是link协议数据,杨涛中转给高胜处理时候逻辑上有冲突,导致无法单独控制亮度值,需要同时发送开关值与亮度值。
            if (DB_ResidenceData.Instance.GatewayType == 0)
            {
                if(commandDictionary.Count == 1 && commandDictionary.ContainsKey(FunctionAttributeKey.Brightness))
                {
                    commandDictionary.Add(FunctionAttributeKey.OnOff, commandDictionary[FunctionAttributeKey.Brightness] == "0" ? "off" : "on");
                }
            }
            ///dome控制
            if (MainPage.NoLoginMode)
@@ -443,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);