11111
This commit is contained in:
@@ -25,8 +25,17 @@ public sealed class ConfiguredSleepLightModule : HealthDeviceModule
|
||||
}
|
||||
public override async Task SetPowerAsync(bool turnOn, CancellationToken token)
|
||||
{
|
||||
if (turnOn) { await _transition.StartSleepAsync(2700, token); return; }
|
||||
if (turnOn && _light.StartSleepOnManualPowerOn)
|
||||
{
|
||||
await _transition.StartSleepAsync(2700, token);
|
||||
return;
|
||||
}
|
||||
await _transition.CancelAsync(token);
|
||||
if (turnOn)
|
||||
{
|
||||
await base.SetPowerAsync(true, token);
|
||||
return;
|
||||
}
|
||||
var command = GetShutdownCommands().Single();
|
||||
await Runner.SendAsync(command, token);
|
||||
await Runner.VerifyParameterAsync(command, token);
|
||||
|
||||
Reference in New Issue
Block a user