fix: updates mode for partition sensors when mode of room combiner changes

This commit is contained in:
Neil Dorin
2024-06-28 12:57:06 -06:00
parent c7f4bf1fb2
commit 71815eff17

View File

@@ -132,6 +132,8 @@ namespace PepperDash.Essentials.Core
void PartitionPresentFeedback_OutputChange(object sender, FeedbackEventArgs e)
{
if (!IsInAutoMode) return;
StartDebounceTimer();
}
@@ -232,16 +234,33 @@ namespace PepperDash.Essentials.Core
public void SetAutoMode()
{
IsInAutoMode = true;
foreach (var partition in Partitions)
{
partition.SetAutoMode();
}
}
public void SetManualMode()
{
IsInAutoMode = false;
foreach (var partition in Partitions)
{
partition.SetManualMode();
}
}
public void ToggleMode()
{
IsInAutoMode = !IsInAutoMode;
if(IsInAutoMode)
{
SetManualMode();
}
else
{
SetAutoMode();
}
}
public List<IRoomCombinationScenario> RoomCombinationScenarios { get; private set; }