Move some types

This commit is contained in:
Sven van Heugten 2026-01-17 11:38:55 +01:00
parent 275a0677eb
commit 78a692bd43
3 changed files with 10 additions and 11 deletions

View file

@ -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

View file

@ -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

View file

@ -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"