Introduce the Models module in order to make others internal
This commit is contained in:
parent
915d01e086
commit
c377ec25dc
6 changed files with 31 additions and 26 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue