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(); }
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)); }