コード例 #1
0
ファイル: FloorConfiguration.cs プロジェクト: v1ku/HA4IoT
 private void SetupStairwayLamps(IArea room)
 {
     _automationFactory.RegisterTurnOnAndOffAutomation(room, Floor.CombinedStairwayLampAutomation)
     .WithTrigger(room.GetMotionDetector(Floor.StairwayMotionDetector))
     .WithTrigger(room.GetButton(Floor.ButtonStairway).GetPressedShortlyTrigger())
     .WithTarget(room.GetActuator(Floor.CombinedStairwayLamp))
     .WithEnabledAtNight();
 }
コード例 #2
0
 private void SetupStairwayLamps(IArea room)
 {
     room.SetupTurnOnAndOffAutomation()
     .WithTrigger(room.GetMotionDetector(Floor.StairwayMotionDetector))
     .WithTrigger(room.GetButton(Floor.ButtonStairway).GetPressedShortlyTrigger())
     .WithTarget(room.GetActuator(Floor.CombinedStairwayLamp))
     .WithEnabledAtNight(Controller.ServiceLocator.GetService <IDaylightService>())
     .WithOnDuration(TimeSpan.FromSeconds(30));
 }
コード例 #3
0
 private void SetupStairwayLamps(IArea room)
 {
     _automationFactory.RegisterTurnOnAndOffAutomation(room, Floor.CombinedStairwayLampAutomation)
         .WithTrigger(room.GetMotionDetector(Floor.StairwayMotionDetector))
         .WithTrigger(room.GetButton(Floor.ButtonStairway).GetPressedShortlyTrigger())
         .WithTarget(room.GetActuator(Floor.CombinedStairwayLamp))
         .WithEnabledAtNight();
 }