night-light/NightLight.Core/Models.fs
2026-01-04 12:08:10 +01:00

22 lines
471 B
FSharp

module NightLight.Models
open System
type State = { Time: DateTime }
type Message = { Topic: string; Payload: string }
type Event =
| ReceivedZigbeeEvent of Message
| TimeChanged of DateTime
type ParseZigbeeEventError =
| InvalidJson
| MissingTypeField
| MissingDataField
| MissingFriendlyNameField
| InvalidTypeField
| InvalidFriendlyNameField
| UnknownType
type ParseEventError = ParseZigbeeEventError of ParseZigbeeEventError