mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +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;
|
_propertiesConfig = props;
|
||||||
|
|
||||||
|
Partitions = new List<IPartitionController>();
|
||||||
|
RoomCombinationScenarios = new List<IRoomCombinationScenario>();
|
||||||
|
|
||||||
if (_propertiesConfig.ScenarioChangeDebounceTimeSeconds > 0)
|
if (_propertiesConfig.ScenarioChangeDebounceTimeSeconds > 0)
|
||||||
{
|
{
|
||||||
_scenarioChangeDebounceTimeSeconds = _propertiesConfig.ScenarioChangeDebounceTimeSeconds;
|
_scenarioChangeDebounceTimeSeconds = _propertiesConfig.ScenarioChangeDebounceTimeSeconds;
|
||||||
|
|
@ -136,11 +139,6 @@ namespace PepperDash.Essentials.Core
|
||||||
// the partition can't be found or the state doesn't match
|
// the partition can't be found or the state doesn't match
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
// check the next partition state
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// if it hasn't returned false by now we have the matching scenario
|
// if it hasn't returned false by now we have the matching scenario
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue