mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
feat: adds config props to disable power on/off automation
This commit is contained in:
parent
a220474101
commit
8d3edde28c
2 changed files with 36 additions and 0 deletions
|
|
@ -152,6 +152,15 @@ namespace PepperDash.Essentials.Devices.Common.Shades
|
||||||
|
|
||||||
private void IsCoolingDownFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
private void IsCoolingDownFeedback_OutputChange(object sender, FeedbackEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (Config.DisableAutoRaiseOnPowerOff)
|
||||||
|
{
|
||||||
|
this.LogDebug(
|
||||||
|
"Auto-raise on power-off disabled for {type}; leaving position unchanged (manual control only)",
|
||||||
|
Type
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
!DisplayDevice.IsCoolingDownFeedback.BoolValue
|
!DisplayDevice.IsCoolingDownFeedback.BoolValue
|
||||||
&& Type == eScreenLiftControlType.lift
|
&& Type == eScreenLiftControlType.lift
|
||||||
|
|
@ -174,6 +183,15 @@ namespace PepperDash.Essentials.Devices.Common.Shades
|
||||||
{
|
{
|
||||||
if (DisplayDevice.IsWarmingUpFeedback.BoolValue)
|
if (DisplayDevice.IsWarmingUpFeedback.BoolValue)
|
||||||
{
|
{
|
||||||
|
if (Config.DisableAutoLowerOnPowerOn)
|
||||||
|
{
|
||||||
|
this.LogDebug(
|
||||||
|
"Auto-lower on power-on disabled for {type}; leaving position unchanged (manual control only)",
|
||||||
|
Type
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Lower();
|
Lower();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,5 +41,23 @@ namespace PepperDash.Essentials.Devices.Common.Shades
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonProperty("muteOnScreenUp")]
|
[JsonProperty("muteOnScreenUp")]
|
||||||
public bool MuteOnScreenUp { get; set; }
|
public bool MuteOnScreenUp { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// When true, this controller does NOT automatically lower when its assigned display powers on
|
||||||
|
/// (warms up). Manual Raise/Lower still work, and the power-off auto-raise is unaffected. Intended
|
||||||
|
/// for a projector screen that must not auto-drop in a public space for safety, while the projector
|
||||||
|
/// lift (a separate controller) can still drop automatically.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("disableAutoLowerOnPowerOn")]
|
||||||
|
public bool DisableAutoLowerOnPowerOn { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// When true, this controller does NOT automatically raise when its assigned display powers off
|
||||||
|
/// (cools down). Manual Raise/Lower still work, and the power-on auto-lower is unaffected. The
|
||||||
|
/// companion to <see cref="DisableAutoLowerOnPowerOn"/>; together they make a controller fully
|
||||||
|
/// manual while leaving other controllers (e.g. the lift) on their default automatic behavior.
|
||||||
|
/// </summary>
|
||||||
|
[JsonProperty("disableAutoRaiseOnPowerOff")]
|
||||||
|
public bool DisableAutoRaiseOnPowerOff { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue