mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
fix: updates mode for partition sensors when mode of room combiner changes
This commit is contained in:
parent
c7f4bf1fb2
commit
71815eff17
1 changed files with 20 additions and 1 deletions
|
|
@ -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; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue