Bedroom buttons: long off press turns the hallway lights off too

This commit is contained in:
MasseR committed 2026-11-09 12:11:34 +02:00
1 parent c5c11fe8d3
commit 383143024a
2 files changed
+18

No files matched your search

+12
View File
@@ -195,6 +195,14 @@ buttonSpec = describe "bedroomButtonController" $ do
concat (services (runHASS bedroomButtonController [masseButton "2_short_release"]))
`shouldContain` [light [area] Off]
it "Masse long off click also turns the hallway lights off" $
concat (services (runHASS bedroomButtonController [masseButton "2_long_press"]))
`shouldContain` [light [EntityId "light.hallway_lights"] Off]
it "Masse short off click leaves the hallway lights alone" $
concat (services (runHASS bedroomButtonController [masseButton "2_short_release"]))
`shouldNotContain` [light [EntityId "light.hallway_lights"] Off]
it "Enishen single click turns on her nightstand scene (lowest)" $
concat (services (runHASS bedroomButtonController [enishenButton "1_short_release"]))
`shouldContain` [activateScene "scene.makuuhuone_jemina"]
@@ -211,6 +219,10 @@ buttonSpec = describe "bedroomButtonController" $ do
concat (services (runHASS bedroomButtonController [enishenButton "2_short_release"]))
`shouldContain` [light [area] Off]
it "Enishen long off click also turns the hallway lights off" $
concat (services (runHASS bedroomButtonController [enishenButton "2_long_press"]))
`shouldContain` [light [EntityId "light.hallway_lights"] Off]
it "ignores the initial press (scene only fires on release)" $
services (runHASS bedroomButtonController [masseButton "1_initial_press"])
`shouldBe` [[]]