fix: Initialize lists for partitions and scenarios

also removed unnecessary else
This commit is contained in:
Andrew Welker
2021-07-20 08:28:25 -06:00
parent a5046df671
commit 94c0e92f6b

View File

@@ -27,6 +27,9 @@ namespace PepperDash.Essentials.Core
{
_propertiesConfig = props;
Partitions = new List<IPartitionController>();
RoomCombinationScenarios = new List<IRoomCombinationScenario>();
if (_propertiesConfig.ScenarioChangeDebounceTimeSeconds > 0)
{
_scenarioChangeDebounceTimeSeconds = _propertiesConfig.ScenarioChangeDebounceTimeSeconds;
@@ -136,11 +139,6 @@ namespace PepperDash.Essentials.Core
// the partition can't be found or the state doesn't match
return false;
}
else
{
// check the next partition state
continue;
}
}
// if it hasn't returned false by now we have the matching scenario
return true;