diff --git a/NightLight.Core/Models.fs b/NightLight.Core/Models.fs index 363f085..5243bcb 100644 --- a/NightLight.Core/Models.fs +++ b/NightLight.Core/Models.fs @@ -9,7 +9,7 @@ type Event = | TimeChanged of DateTime type ParseZigbeeEventError = - | UnknownTopic + | UnknownTopic of string | InvalidJson | MissingTypeField | MissingDataField diff --git a/NightLight.Core/ZigbeeEvents.fs b/NightLight.Core/ZigbeeEvents.fs index 0c31a63..632c6b1 100644 --- a/NightLight.Core/ZigbeeEvents.fs +++ b/NightLight.Core/ZigbeeEvents.fs @@ -37,5 +37,5 @@ let parseZigbeeEvent (message: Message) = | Some(JsonValue.String "off") -> Ok(ButtonPress PressedOff) | Some _ -> Error InvalidActionField | None -> Error MissingActionField - | _ -> return! Error UnknownTopic + | _ -> return! Error <| UnknownTopic message.Topic }