fix: Update fusion IP-ID for multiple rooms

This commit is contained in:
Andrew Welker
2021-07-20 11:15:37 -06:00
parent 94c0e92f6b
commit 5f6b650dba

View File

@@ -450,14 +450,13 @@ namespace PepperDash.Essentials
return; return;
} }
uint fusionIpId = 0xf1;
foreach (var roomConfig in ConfigReader.ConfigObject.Rooms) foreach (var roomConfig in ConfigReader.ConfigObject.Rooms)
{ {
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as IEssentialsRoom; var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as IEssentialsRoom;
if (room != null) if (room != null)
{ {
// default IPID
uint fusionIpId = 0xf1;
// default to no join map key // default to no join map key
string fusionJoinMapKey = string.Empty; string fusionJoinMapKey = string.Empty;
@@ -515,9 +514,13 @@ namespace PepperDash.Essentials
DeviceManager.AddDevice(room); DeviceManager.AddDevice(room);
} }
fusionIpId += 1;
} }
else else
{
Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key); Debug.Console(0, Debug.ErrorLogLevel.Notice, "Notice: Cannot create room from config, key '{0}' - Is this intentional? This may be a valid configuration.", roomConfig.Key);
}
} }
Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded."); Debug.Console(0, Debug.ErrorLogLevel.Notice, "All Rooms Loaded.");