wjc
2022-12-07 b8c54a7e4048317fc0f33c63a802d60396f82eb0
HDL_ON/Entity/Function/Function.cs
@@ -273,6 +273,10 @@
        /// </summary>
        public string deviceId = "0";
        /// <summary>
        /// 第三方设备扩展id
        /// </summary>
        public string extDevId = string.Empty;
        /// <summary>
        /// 设备spk
        /// </summary>
        public string spk = "";
@@ -400,10 +404,22 @@
        /// 是否收藏
        /// </summary>
        public bool collect = false;
        private bool _online = false;
        /// <summary>
        /// 是否在线
        /// </summary>
        public bool online = true;
        public bool online
        {
            get
            {
                return true;
            }
            set
            {
                _online = value;
            }
        }
        /// <summary>
        /// 环境面板 绑定的 设备目标sid列表
@@ -737,6 +753,7 @@
                    case FunctionAttributeKey.CCT:
                    case FunctionAttributeKey.RGB:
                    case FunctionAttributeKey.Angle:
                    case "security":
                        //case FunctionAttributeKey.FadeTime:
                        if (attr.curValue.ToString() == "{}")
                        {
@@ -761,6 +778,10 @@
                                        attr.curValue = "day";
                                    }
                                }
                            }
                            else if(attr.key == "security")
                            {
                                attr.curValue = "false";
                            }
                            else
                            {
@@ -989,6 +1010,10 @@
    public static class FunctionAttributeKey
    {
        public const string _null = "";
        /// <summary>
        /// 安防布防状态
        /// </summary>
        public const string Security = "security";
        /// <summary>
        /// 开关
        /// </summary>
@@ -1309,7 +1334,14 @@
        /// 通用开关
        /// </summary>
        public const string OtherCommon = "other.common";
        /// <summary>
        /// 大华摄像头
        /// </summary>
        public const string IpCam_Imou = "security.ipcam.imou";
        /// <summary>
        /// 机械手
        /// </summary>
        public const string MechanicalArm = "electrical.mechanical_arm";
        /// <summary>
        /// 空调科技系统(绿建)
        /// 总控
@@ -1602,6 +1634,10 @@
        public const string SenesorMegahealth = "sensor.megahealth";
        public const string SenesorMegahealth2 = "sensor.megahealth.zg";
        /// <summary>
        /// 毫米波传感器(姿态版)
        /// </summary>
        public const string SensorMmvPose = "sensor.mmv_pose";
        /// <summary>
        /// 紧急呼叫
        /// </summary>
        public const string SensorHelp = "sensor.help";
@@ -1626,6 +1662,7 @@
            spkList.Add(SensorDryContact2);
            spkList.Add(SenesorMegahealth);
            spkList.Add(SenesorMegahealth2);
            spkList.Add(SensorMmvPose);
            return spkList;
        }
        #endregion
@@ -1644,6 +1681,10 @@
        }
        #region 环境传感器
        /// <summary>
        /// (PM10传感器)
        /// </summary>
        public const string SensorPm10 = "sensor.pm10";
        /// <summary>
        /// (温度传感器)
        /// </summary>
@@ -1693,6 +1734,7 @@
        {
            var spkList = new List<string>();
            spkList.Add(SensorTemperature);
            spkList.Add(SensorPm10);
            spkList.Add(SensorPm25);
            spkList.Add(SensorCO2);
            spkList.Add(SensorTVOC);
@@ -1711,6 +1753,7 @@
        {
            var spkList = new List<string>();
            spkList.Add(SensorTemperature);
            spkList.Add(SensorPm10);
            spkList.Add(SensorPm25);
            spkList.Add(SensorCO2);
            spkList.Add(SensorTVOC);
@@ -1897,6 +1940,7 @@
            spkList.Add(ElectricTuyaWaterValve2);
            spkList.Add(ElectricTuyaWeepRobot);
            spkList.Add(ElectricTuyaWeepRobot2);
            spkList.Add(SensorMmvPose);
            spkList.Add(SenesorMegahealth);
            spkList.Add(SenesorMegahealth2);
            return spkList;
@@ -1922,7 +1966,7 @@
                    list.Add(ElectricTuyaWeepRobot2);
                    break;
                case BrandType.All3tyBrand:
                    list.Add(SenesorMegahealth);//兆观
                    list.Add(SenesorMegahealth2);//兆观
                    break;
            }
            return list;