wjc
2023-07-26 80075a89316729927db0ad65ca7674f81a942a93
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -1112,7 +1112,8 @@
                                        string on_off = GetKeyValue("on_off", dicList);
                                        string brightness = GetKeyValue("brightness", dicList);
                                        string cct = GetKeyValue(FunctionAttributeKey.CCT, dicList);
                                        string colorful = GetKeyValue(FunctionAttributeKey.Colorful, dicList);
                                        //自动化组控 炫彩功能
                                        //string colorful = GetKeyValue(FunctionAttributeKey.Colorful, dicList);
                                        string rgb = GetKeyValue("rgb", dicList);
@@ -1138,19 +1139,18 @@
                                            stateStr += "," + Language.StringByID(StringId.ColorTemperature) + cct + "k";
                                        }
                                        if (!string.IsNullOrEmpty(colorful))
                                        {
                                            stateStr += "," + Language.StringByID(StringId.ColorfulFunction);
                                            if (colorful == "on")
                                            {
                                                stateStr += Language.StringByID(StringId.onLogic);
                                            }
                                            else if (colorful == "off")
                                            {
                                                stateStr += Language.StringByID(StringId.offLogic);
                                            }
                                        }
                                        //if (!string.IsNullOrEmpty(colorful))
                                        //{
                                        //    stateStr += "," + Language.StringByID(StringId.ColorfulFunction);
                                        //    if (colorful == "on")
                                        //    {
                                        //        stateStr += Language.StringByID(StringId.onLogic);
                                        //    }
                                        //    else if (colorful == "off")
                                        //    {
                                        //        stateStr += Language.StringByID(StringId.offLogic);
                                        //    }
                                        //}
                                        if (!string.IsNullOrEmpty(rgb) && rgb.Length > 6)
                                        {
@@ -2506,9 +2506,9 @@
        public string GetTemperatureUnit(Entity.Function device)
        {
            string unit = string.Empty;
            if (device.GetAttribute("temperature_type") != null && device.GetAttribute("temperature_type").value.Count > 0)
            if (device.GetAttribute("temperature_type") != null)
            {
                unit = device.GetAttribute("temperature_type").value[0];
                unit = device.GetAttribute("temperature_type").unit;
            }
            if (string.IsNullOrEmpty(unit))
            {