mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
fix: Initialize lists for partitions and scenarios
also removed unnecessary else
This commit is contained in:
parent
a5046df671
commit
94c0e92f6b
1 changed files with 3 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue