From 78a692bd4344dabd17e4f678aa51bacaee97e733 Mon Sep 17 00:00:00 2001 From: Sven van Heugten Date: Sat, 17 Jan 2026 11:38:55 +0100 Subject: [PATCH] Move some types --- NightLight.Core/Models.fs | 10 ++++++++++ NightLight.Core/Moods.fs | 6 ------ NightLight.Core/ZigbeeCommands.fs | 5 ----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/NightLight.Core/Models.fs b/NightLight.Core/Models.fs index d37cc9a..5ef3cc9 100644 --- a/NightLight.Core/Models.fs +++ b/NightLight.Core/Models.fs @@ -77,3 +77,13 @@ let remoteControlledLights = lights |> Seq.filter (not << _.ControlledWithRemote.IsNonRemote) let remoteControlFriendlyName = DeviceFriendlyName "FjÀrrkontroll" + +type internal State = + | On + | Off + +type internal Brightness = Brightness of int + +type internal Color = + | ColorByCoordinates of float * float + | ColorByTemperature of int diff --git a/NightLight.Core/Moods.fs b/NightLight.Core/Moods.fs index 9f33cf3..39efaa0 100644 --- a/NightLight.Core/Moods.fs +++ b/NightLight.Core/Moods.fs @@ -15,12 +15,6 @@ let getDesiredMood room partOfDay = | Bedroom, Day -> Yellow | _, Night -> Red -type Color = - | ColorByCoordinates of float * float - | ColorByTemperature of int - -type Brightness = Brightness of int - let getDesiredColorAndBrightness bulb mood = let white = ColorByCoordinates(0.3227, 0.329) let yellow = ColorByTemperature 454 diff --git a/NightLight.Core/ZigbeeCommands.fs b/NightLight.Core/ZigbeeCommands.fs index 0e16a6e..8c4dea2 100644 --- a/NightLight.Core/ZigbeeCommands.fs +++ b/NightLight.Core/ZigbeeCommands.fs @@ -2,11 +2,6 @@ module internal NightLight.Core.ZigbeeCommands open System.Text.Json.Nodes open NightLight.Core.Models -open NightLight.Core.Moods - -type State = - | On - | Off let toZigbeeCommand light payload = let topic = $"zigbee2mqtt/{light.FriendlyName.Get}/set"