mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-17 13:45:01 +00:00
fix: updates mode for partition sensors when mode of room combiner changes
This commit is contained in:
@@ -132,6 +132,8 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
void PartitionPresentFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
void PartitionPresentFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (!IsInAutoMode) return;
|
||||||
|
|
||||||
StartDebounceTimer();
|
StartDebounceTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,16 +234,33 @@ namespace PepperDash.Essentials.Core
|
|||||||
public void SetAutoMode()
|
public void SetAutoMode()
|
||||||
{
|
{
|
||||||
IsInAutoMode = true;
|
IsInAutoMode = true;
|
||||||
|
|
||||||
|
foreach (var partition in Partitions)
|
||||||
|
{
|
||||||
|
partition.SetAutoMode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetManualMode()
|
public void SetManualMode()
|
||||||
{
|
{
|
||||||
IsInAutoMode = false;
|
IsInAutoMode = false;
|
||||||
|
|
||||||
|
foreach (var partition in Partitions)
|
||||||
|
{
|
||||||
|
partition.SetManualMode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleMode()
|
public void ToggleMode()
|
||||||
{
|
{
|
||||||
IsInAutoMode = !IsInAutoMode;
|
if(IsInAutoMode)
|
||||||
|
{
|
||||||
|
SetManualMode();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetAutoMode();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<IRoomCombinationScenario> RoomCombinationScenarios { get; private set; }
|
public List<IRoomCombinationScenario> RoomCombinationScenarios { get; private set; }
|
||||||
|
|||||||
Reference in New Issue
Block a user