Introduce the Models module in order to make others internal

This commit is contained in:
Sven van Heugten 2026-01-03 19:24:37 +01:00
parent 915d01e086
commit c377ec25dc
6 changed files with 31 additions and 26 deletions

View file

@ -1,6 +1,6 @@
module NightLight.Core
open System
open NightLight.Models
open NightLight.PartsOfDay
open NightLight.ZigbeeEvents
open NightLight.ZigbeeCommands
@ -18,14 +18,6 @@ let internal generateZigbeeCommandToFixLight partOfDay light =
generateZigbeeCommand light.FriendlyName color brightness
type Event =
| ReceivedZigbeeEvent of payload: string
| TimeChanged of DateTime
type ParseEventError = ParseZigbeeEventError of ParseZigbeeEventError
type State = { Time: DateTime }
let onEventReceived (state: State) (event: Event) : Result<State * ZigbeeCommand seq, ParseEventError> =
result {
let partOfDay = getPartOfDay state.Time