wei
2021-07-07 42368161d6b795058dfc99ee9774aaf3f69e81d4
HDL_ON/Entity/Function/Function.cs
@@ -507,7 +507,25 @@
                            {
                                attr.curValue = "off";
                            }
                            else
                            else if (attr.key == FunctionAttributeKey.Mode )
                            {
                                if (DB_ResidenceData.Instance.GatewayType == 0)
                                {
                                    attr.curValue = "0";
                                }
                                else
                                {
                                    if (SPK.AcSpkList().Contains(spk))
                                    {
                                        attr.curValue = "cool";
                                    }
                                    else if (SPK.FhSpkList().Contains(spk))
                                    {
                                        attr.curValue = "day";
                                    }
                                }
                            }
                            else
                            {
                                attr.curValue = "0";
                            }
@@ -516,6 +534,10 @@
                        {
                            double vv = 16;
                            Double.TryParse(attr.curValue.ToString(), out vv);
                            if (vv == 0)
                            {
                                vv = 26;
                            }
                            sFunc.status.Add(new SceneFunctionStatus() { key = attr.key, value = Convert.ToInt32(vv).ToString() });
                        }
                        else
@@ -1164,7 +1186,7 @@
        /// <summary>
        /// 超声波传感器
        /// </summary>
        public const string SensoruUtrasonic = "sensor.ultrasonic";
        public const string SensorUtrasonic = "sensor.ultrasonic";
        /// <summary>
        /// (干接点)
        /// </summary>
@@ -1174,26 +1196,22 @@
        /// </summary>
        public const string SenesorMegahealth = "sensor.megahealth";
        /// <summary>
        /// 环境检测传感器
        /// </summary>
        public const string SenesorEnvironment = "sensor.environment";
        /// <summary>
        /// 安防传感器spk列表
        /// </summary>
        /// <returns></returns>
        public static List<string> ArmSensorSpkList()
        {
            var spkList = new List<string>();
            spkList.Add(SensorLight);
            //spkList.Add(SensorLight);
            spkList.Add(SensorPir);
            spkList.Add(SensorDoorWindow);
            spkList.Add(SensorSmoke);
            spkList.Add(SensorWater);
            spkList.Add(SensorGas);
            spkList.Add(SensorShanLan);
            spkList.Add(SensorDuiShe);
            spkList.Add(SensoruUtrasonic);
            spkList.Add(SensorDryContact);
            //spkList.Add(SensorGas);
            //spkList.Add(SensorShanLan);
            //spkList.Add(SensorDuiShe);
            //spkList.Add(SensoruUtrasonic);
            //spkList.Add(SensorDryContact);
            spkList.Add(SenesorMegahealth);
            return spkList;
        }
@@ -1220,6 +1238,13 @@
        /// 湿度传感器
        /// </summary>
        public const string SensorHumidity = "sensor.humidity";
        /// <summary>
        /// 环境传感器
        /// 环境检测传感器
        /// 特殊类spk
        /// 该spk功能是环境传感器功能的集成
        /// </summary>
        public const string SensorEnvironment = "sensor.environment";
        /// <summary>
        /// 环境传感器spk列表
@@ -1324,6 +1349,7 @@
            spkList.Add(TvIr);
            spkList.Add(TvXmIr);
            spkList.Add(ElectricFan);
            spkList.Add(FanIr);
            spkList.Add(ClothesHanger);
            spkList.Add(IrLearn);
            spkList.Add(PjtIr);
@@ -1337,7 +1363,6 @@
        #endregion
        #region 设备类
        /// <summary>
@@ -1396,6 +1421,12 @@
        }
        #endregion
        /// <summary>
        /// 没有状态显示的功能spk列表
        /// </summary>
        public static List<string> NotStatusSpkList = new List<string> {
            ElectricTV, FanIr, TvIr, TvXmIr, StbIr, PjtIr, IrLearn
        };
        /// <summary>
        /// 第三方品牌列表