wjc
2022-07-22 d538cbe6f5e307122c37cde69b999dc9df30731a
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -148,6 +148,8 @@
        public List<HDL_ON.Entity.Room> GetGatewayRoomList()
        {
            return HDL_ON.Entity.SpatialInfo.CurrentSpatial.RoomList;
        }
        /// <summary>
        /// 获取网关房间列表
@@ -180,7 +182,9 @@
        /// <returns></returns>
        public List<HDL_ON.Entity.Function> GetGatewayDeviceList()
        {
            return Entity.FunctionList.List.GetDeviceFunctionList();
            var list = Entity.FunctionList.List.GetDeviceFunctionList();
            return GetTestDevice(list, true);
            //return list;
        }
        /// <summary>
        /// 获取场景列表
@@ -1014,6 +1018,27 @@
        /// 推送列表<这里数据已经推送过>
        /// </summary>
        private static List<Push> pushList = new List<Push>();
        /// <summary>
        /// 获取模拟的设备列表
        /// </summary>
        /// <param name="isBool">是否开启</param>
        /// <returns></returns>
        private List<Entity.Function> GetTestDevice(List<HDL_ON.Entity.Function> list, bool isBool)
        {
            if (isBool)
            {
                Entity.Function function = new Entity.Function { sid = "0123456789", name = "超声波传感器", spk = Entity.SPK.SensorUtrasonic };
                var device = list.Find((o) => { return o.sid == function.sid; });
                if (device == null)
                {
                    list.Add(function);
                }
            }
            return list;
        }
    }
    public class Push