Test alternative way to turn on light
This commit is contained in:
parent
6b73e32cda
commit
1265289866
1 changed files with 2 additions and 1 deletions
|
|
@ -16,11 +16,12 @@ let internal generateZigbeeCommandsToFixLight (light: Light) (desiredLightState:
|
||||||
match light.ControlledWithRemote, desiredLightState.State with
|
match light.ControlledWithRemote, desiredLightState.State with
|
||||||
| NonRemote, On -> ()
|
| NonRemote, On -> ()
|
||||||
| NonRemote, Off -> failwith $"Unexpectly trying to turn off {light}. It's not remote-controlled."
|
| NonRemote, Off -> failwith $"Unexpectly trying to turn off {light}. It's not remote-controlled."
|
||||||
|
| _, On when light.Bulb = IkeaBulb -> () // Rely on the brightness command for turning it on
|
||||||
| _, _ -> yield generateStateCommand desiredLightState.State light
|
| _, _ -> yield generateStateCommand desiredLightState.State light
|
||||||
|
|
||||||
if desiredLightState.State = On then
|
if desiredLightState.State = On then
|
||||||
yield generateColorCommand light desiredLightState.Color
|
|
||||||
yield generateBrightnessCommand light desiredLightState.Brightness
|
yield generateBrightnessCommand light desiredLightState.Brightness
|
||||||
|
yield generateColorCommand light desiredLightState.Color
|
||||||
}
|
}
|
||||||
|
|
||||||
type internal NightLightState =
|
type internal NightLightState =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue