mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-08 17:24:47 +00:00
fix: Initialize lists for partitions and scenarios
also removed unnecessary else
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user