HDL_ON/Entity/DB_ResidenceData.cs
@@ -35,6 +35,22 @@
                else
                {
                    var curRegion = UserInfo.Current.regionList.Find((obj) => obj.RegionID == CurReginID);
                    if (curRegion == null)
                    {
                        if (UserInfo.Current.regionList != null && UserInfo.Current.regionList.Count > 0)
                        {
                            CurReginID = UserInfo.Current.regionList[0].RegionID;
                            //恢复备份
                            HDLCommon.Current.RestoreHomeBackup(CurReginID);
                            return UserInfo.Current.regionList[0];
                        }
                        else
                        {
                            return new RegionInfoRes();
                        }
                    }
                    //if (curRegion == null)
                    //{
                    //    CurReginID =  UserInfo.Current.regionList[0].RegionID;
@@ -131,18 +147,20 @@
                        {
                            sid = "030101123456780202010005ABCD",
                            name = "灯光1",
                            function = new List<FunctionAttributes>() {
                            attributes = new List<FunctionAttributes>() {
                                        new FunctionAttributes { key="on_off", max=100,min = 0, value= new List<string> { "on","off"} },
                                        },
                            roomIdList = new List<string>() { "0001" },
                            roomIds = new List<string>() { "0001" },
                            bus_Data = new BusData
                            {
                                SubnetID = 42,
                                DeviceID = 6,
                                LoopID = 1,
                                addresses = "2A06",
                                loopId = 1,
                            },
                        }.SaveFunctionData();
@@ -535,6 +553,7 @@
                    foreach (var r in rooms)
                    {
                        r.GetRoomFunctions(true);
                        r.GetRoomScenes(true);
                    }
                }
                catch (Exception ex)