wjc
2023-03-10 e66503d70f26a3109fbadf47abcb8ba31d619e3c
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 = "";
@@ -749,6 +753,7 @@
                    case FunctionAttributeKey.CCT:
                    case FunctionAttributeKey.RGB:
                    case FunctionAttributeKey.Angle:
                    case "security":
                        //case FunctionAttributeKey.FadeTime:
                        if (attr.curValue.ToString() == "{}")
                        {
@@ -773,6 +778,10 @@
                                        attr.curValue = "day";
                                    }
                                }
                            }
                            else if(attr.key == "security")
                            {
                                attr.curValue = "false";
                            }
                            else
                            {
@@ -974,6 +983,11 @@
        /// </summary>
        public List<string> value = new List<string>();
        /// <summary>
        /// 步进
        /// 空调温度控制 0.5 1
        /// </summary>
        public string step = "1";
        /// <summary>
        /// 最大值
        /// </summary>
        public int max = 100;
@@ -1001,6 +1015,10 @@
    public static class FunctionAttributeKey
    {
        public const string _null = "";
        /// <summary>
        /// 安防布防状态
        /// </summary>
        public const string Security = "security";
        /// <summary>
        /// 开关
        /// </summary>
@@ -1322,6 +1340,10 @@
        /// </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";
@@ -1350,8 +1372,20 @@
            list.Add(DoorLock);
            return list;
        }
        /// <summary>
        /// 萤石视频门锁
        /// </summary>
        public const string VideoDoorLock="security.door.ezviz";
        /// <summary>
        /// 萤石视频门锁spk列表
        /// </summary>
        /// <returns></returns>
        public static List<string> GetVideoDoorLockSPKList()
        {
            var list = new List<string>();
            list.Add(VideoDoorLock);
            return list;
        }
        #region 灯光
        /// <summary>
@@ -1524,6 +1558,10 @@
        /// </summary>
        public const string Inverter = "energy.inverter";
        /// <summary>
        /// 三相逆变器
        /// </summary>
        public const string InverterRst = "energy.inverter_rst";
        /// <summary>
        /// 能源模块
        /// </summary>
        public const string EnergyStandard = "energy.standard";
@@ -1665,6 +1703,10 @@
        #region 环境传感器
        /// <summary>
        /// (PM10传感器)
        /// </summary>
        public const string SensorPm10 = "sensor.pm10";
        /// <summary>
        /// (温度传感器)
        /// </summary>
        public const string SensorTemperature = "sensor.temperature";
@@ -1713,6 +1755,7 @@
        {
            var spkList = new List<string>();
            spkList.Add(SensorTemperature);
            spkList.Add(SensorPm10);
            spkList.Add(SensorPm25);
            spkList.Add(SensorCO2);
            spkList.Add(SensorTVOC);
@@ -1731,6 +1774,7 @@
        {
            var spkList = new List<string>();
            spkList.Add(SensorTemperature);
            spkList.Add(SensorPm10);
            spkList.Add(SensorPm25);
            spkList.Add(SensorCO2);
            spkList.Add(SensorTVOC);