Introduce the remote into FakeHome

This commit is contained in:
Sven van Heugten 2026-01-05 22:00:14 +01:00
parent cef2a20f7a
commit 52e0ec85e9
2 changed files with 34 additions and 6 deletions

View file

@ -8,11 +8,15 @@ let private genTimeChangedInteraction =
ArbMap.defaults |> ArbMap.generate<DateTime> |> Gen.map Interaction.TimeChanged
let private genHumanInteraction =
Gen.elements lights
|> Gen.bind (fun light ->
[ LightPoweredOn light; LightPoweredOff light ]
|> Gen.elements
|> Gen.map Interaction.HumanInteraction)
let genLightInteraction =
Gen.elements lights
|> Gen.bind (fun light -> Gen.elements [ LightPoweredOn light; LightPoweredOff light ])
let genRemoteInteraction =
Gen.elements [ RemotePressedOnButton; RemotePressedOffButton ]
Gen.oneof [ genLightInteraction; genRemoteInteraction ]
|> Gen.map Interaction.HumanInteraction
let private genInteraction =
Gen.oneof [ genTimeChangedInteraction; genHumanInteraction ]