Move some types
This commit is contained in:
parent
275a0677eb
commit
78a692bd43
3 changed files with 10 additions and 11 deletions
|
|
@ -77,3 +77,13 @@ let remoteControlledLights =
|
||||||
lights |> Seq.filter (not << _.ControlledWithRemote.IsNonRemote)
|
lights |> Seq.filter (not << _.ControlledWithRemote.IsNonRemote)
|
||||||
|
|
||||||
let remoteControlFriendlyName = DeviceFriendlyName "Fjärrkontroll"
|
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
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,6 @@ let getDesiredMood room partOfDay =
|
||||||
| Bedroom, Day -> Yellow
|
| Bedroom, Day -> Yellow
|
||||||
| _, Night -> Red
|
| _, Night -> Red
|
||||||
|
|
||||||
type Color =
|
|
||||||
| ColorByCoordinates of float * float
|
|
||||||
| ColorByTemperature of int
|
|
||||||
|
|
||||||
type Brightness = Brightness of int
|
|
||||||
|
|
||||||
let getDesiredColorAndBrightness bulb mood =
|
let getDesiredColorAndBrightness bulb mood =
|
||||||
let white = ColorByCoordinates(0.3227, 0.329)
|
let white = ColorByCoordinates(0.3227, 0.329)
|
||||||
let yellow = ColorByTemperature 454
|
let yellow = ColorByTemperature 454
|
||||||
|
|
|
||||||
|
|
@ -2,11 +2,6 @@ module internal NightLight.Core.ZigbeeCommands
|
||||||
|
|
||||||
open System.Text.Json.Nodes
|
open System.Text.Json.Nodes
|
||||||
open NightLight.Core.Models
|
open NightLight.Core.Models
|
||||||
open NightLight.Core.Moods
|
|
||||||
|
|
||||||
type State =
|
|
||||||
| On
|
|
||||||
| Off
|
|
||||||
|
|
||||||
let toZigbeeCommand light payload =
|
let toZigbeeCommand light payload =
|
||||||
let topic = $"zigbee2mqtt/{light.FriendlyName.Get}/set"
|
let topic = $"zigbee2mqtt/{light.FriendlyName.Get}/set"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue