mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +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;
|
_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;
|
||||||
|
|||||||
Reference in New Issue
Block a user