wei
2020-12-20 fb49279fd0e36e1ed2bd7332eecee9f963c13649
HDL_ON/Entity/Function/Function.cs
@@ -231,7 +231,7 @@
                {
                    roomNameList += ",";
                }
                roomNameList += findRoom.floorName + findRoom.roomName;
                roomNameList += findRoom.floorName +"-"+ findRoom.roomName;
            }
            if (roomNameList == "" && functionType == FunctionType.Scene)
            {
@@ -286,6 +286,15 @@
            var sFunc = new SceneFunction();
            foreach (var attr in attributes)
            {
                switch (attr.key)
                {
                    case FunctionAttributeKey.OnOff:
                    case FunctionAttributeKey.Brightness:
                    case FunctionAttributeKey.Mode:
                    case FunctionAttributeKey.SetTemp:
                    case FunctionAttributeKey.FanSpeed:
                    case FunctionAttributeKey.Percent:
                    case FunctionAttributeKey.FadeTime:
                if (attr.curValue.ToString() == "{}")
                {
                    attr.curValue = "0";
@@ -300,6 +309,8 @@
                {
                    sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = attr.curValue.ToString() });
                }
                        break;
                }
            }
            sFunc.sid = this.sid;
            return sFunc;