Faster transition

This commit is contained in:
2026-09-29 20:42:14 +03:00
parent 73d4255fd7
commit fcaccfdeb0
2 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ bedroomPresenceController = proc x -> do
callService (activateSceneWith "scene.makuuhuone_lepotila" transition) -< () callService (activateSceneWith "scene.makuuhuone_lepotila" transition) -< ()
_ -> returnA -< () _ -> returnA -< ()
where where
transition = Just $ object ["transition" .= (10 :: Int)] transition = Just $ object ["transition" .= (1:: Int)]
data BedroomControls data BedroomControls
@@ -103,7 +103,7 @@ bedroomButtonController = proc x -> do
callService (light [AreaId "makuuhuone"] Off) -< () callService (light [AreaId "makuuhuone"] Off) -< ()
_ -> returnA -< () _ -> returnA -< ()
where where
transition = Just $ object ["transition" .= (5 :: Int)] transition = Just $ object ["transition" .= (1 :: Int)]
+6 -6
View File
@@ -91,15 +91,15 @@ buttonSpec = describe "bedroomButtonController" $ do
it "Masse single click turns on his nightstand scene (lowest)" $ it "Masse single click turns on his nightstand scene (lowest)" $
concat (services (runHASS bedroomButtonController [masseButton "1_short_release"])) concat (services (runHASS bedroomButtonController [masseButton "1_short_release"]))
`shouldContain` [activateSceneWith "scene.makuuhuone_masse" (Just $ object ["transition" .= (5 :: Int)])] `shouldContain` [activateSceneWith "scene.makuuhuone_masse" (Just $ object ["transition" .= (1 :: Int)])]
it "Masse double click turns on the middle scene" $ it "Masse double click turns on the middle scene" $
concat (services (runHASS bedroomButtonController [masseButton "1_double_press"])) concat (services (runHASS bedroomButtonController [masseButton "1_double_press"]))
`shouldContain` [activateSceneWith "scene.makuuhuone_keski" (Just $ object ["transition" .= (5 :: Int)])] `shouldContain` [activateSceneWith "scene.makuuhuone_keski" (Just $ object ["transition" .= (1 :: Int)])]
it "Masse long click turns on the bright scene" $ it "Masse long click turns on the bright scene" $
concat (services (runHASS bedroomButtonController [masseButton "1_long_press"])) concat (services (runHASS bedroomButtonController [masseButton "1_long_press"]))
`shouldContain` [activateSceneWith "scene.makuuhuone_kirkas" (Just $ object ["transition" .= (5 :: Int)])] `shouldContain` [activateSceneWith "scene.makuuhuone_kirkas" (Just $ object ["transition" .= (1 :: Int)])]
it "Masse off click turns the bedroom lights off" $ it "Masse off click turns the bedroom lights off" $
concat (services (runHASS bedroomButtonController [masseButton "2_short_release"])) concat (services (runHASS bedroomButtonController [masseButton "2_short_release"]))
@@ -107,15 +107,15 @@ buttonSpec = describe "bedroomButtonController" $ do
it "Enishen single click turns on her nightstand scene (lowest)" $ it "Enishen single click turns on her nightstand scene (lowest)" $
concat (services (runHASS bedroomButtonController [enishenButton "1_short_release"])) concat (services (runHASS bedroomButtonController [enishenButton "1_short_release"]))
`shouldContain` [activateSceneWith "scene.makuuhuone_jemina" (Just $ object ["transition" .= (5 :: Int)])] `shouldContain` [activateSceneWith "scene.makuuhuone_jemina" (Just $ object ["transition" .= (1 :: Int)])]
it "Enishen double click turns on the middle scene" $ it "Enishen double click turns on the middle scene" $
concat (services (runHASS bedroomButtonController [enishenButton "1_double_press"])) concat (services (runHASS bedroomButtonController [enishenButton "1_double_press"]))
`shouldContain` [activateSceneWith "scene.makuuhuone_keski" (Just $ object ["transition" .= (5 :: Int)])] `shouldContain` [activateSceneWith "scene.makuuhuone_keski" (Just $ object ["transition" .= (1 :: Int)])]
it "Enishen long click turns on the bright scene" $ it "Enishen long click turns on the bright scene" $
concat (services (runHASS bedroomButtonController [enishenButton "1_long_press"])) concat (services (runHASS bedroomButtonController [enishenButton "1_long_press"]))
`shouldContain` [activateSceneWith "scene.makuuhuone_kirkas" (Just $ object ["transition" .= (5 :: Int)])] `shouldContain` [activateSceneWith "scene.makuuhuone_kirkas" (Just $ object ["transition" .= (1 :: Int)])]
it "Enishen off click turns the bedroom lights off" $ it "Enishen off click turns the bedroom lights off" $
concat (services (runHASS bedroomButtonController [enishenButton "2_short_release"])) concat (services (runHASS bedroomButtonController [enishenButton "2_short_release"]))