diff --git a/NightLight.Core/NightLightStateMachine.fs b/NightLight.Core/NightLightStateMachine.fs index 891614c..a99ec09 100644 --- a/NightLight.Core/NightLightStateMachine.fs +++ b/NightLight.Core/NightLightStateMachine.fs @@ -13,16 +13,7 @@ let internal tryFindLight friendlyName = let internal generateZigbeeCommandsToFixLight (light: Light) (desiredLightState: LightState) = seq { - let isRemoteControlled = - light = VardagsrumFonsterlampa || light = SovrumNattduksbordlampa - - if not isRemoteControlled then - match desiredLightState.State with - | On -> () - | Off -> failwith $"Unexpectly trying to turn off {light}. It's not remote-controlled." - else if desiredLightState.State = On && (lightProps light).Bulb = IkeaBulb then - () // Rely on the brightness command for turning it on - else + if desiredLightState.State = Off then yield generateStateCommand desiredLightState.State light if desiredLightState.State = On then