Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public interface ILightTransitionCycleConfigurator<TLight> where TLight : ILight
/// </summary>
/// <param name="timeline">The dictionary mapping timeline points to <see cref="LightParameters"/>.</param>
/// <param name="transitionTimeForTimelineState">
/// The duration of the initial fade from the current state. Defaults to 500ms if null.
/// The duration of the initial fade from the current state. Defaults to 400ms if null.
/// </param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionCycleConfigurator<TLight> AddTimeline(Dictionary<ITimeline, LightParameters> timeline, TimeSpan? transitionTimeForTimelineState = null);
Expand All @@ -125,7 +125,7 @@ public interface ILightTransitionCycleConfigurator<TLight> where TLight : ILight
/// </summary>
/// <param name="timelineFactory">A factory function that creates the timeline mapping based on the pipeline context.</param>
/// <param name="transitionTimeForTimelineState">
/// The duration of the initial fade from the current state. Defaults to 500ms if null.
/// The duration of the initial fade from the current state. Defaults to 400ms if null.
/// </param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionCycleConfigurator<TLight> AddTimeline(Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> timelineFactory, TimeSpan? transitionTimeForTimelineState = null);
Expand Down
4 changes: 2 additions & 2 deletions src/CodeCasa.AutomationPipelines.Lights/DimmerOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public record DimmerOptions
public int BrightnessStep { get; set; } = 51;

/// <summary>
/// Gets or sets the time delay between each brightness step. Defaults to 500 milliseconds.
/// Gets or sets the time delay between each brightness step. Defaults to 400 milliseconds.
/// </summary>
public TimeSpan TimeBetweenSteps { get; set; } = TimeSpan.FromMilliseconds(500);
public TimeSpan TimeBetweenSteps { get; set; } = TimeSpan.FromMilliseconds(400);

/// <summary>
/// Gets or sets the collection of light IDs that define the order for dimming operations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal static class SchedulerExtensions
DateTime? startOfTransition,
DateTime? endOfTransition,
Action<LightTransition?> transitionAction,
int defaultTransitionTimeMs = 500)
int defaultTransitionTimeMs = 400)
{
if (destinationLightParameters == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ internal class TimelineNode : LightTransitionNode
/// <param name="timeline">The dictionary mapping timeline points to <see cref="LightParameters"/>.</param>
/// <param name="scheduler">The Rx scheduler used to manage timing.</param>
/// <param name="transitionTimeForTimelineState">
/// The duration of the initial fade from the current state. Defaults to 500ms if null.
/// The duration of the initial fade from the current state. Defaults to 400ms if null.
/// </param>
public TimelineNode(
Dictionary<ITimeline, LightParameters> timeline,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ ILightTransitionPipelineConfigurator<TLight> AddCycle<T>(IObservable<T> triggerO
/// <typeparam name="T">The type of values emitted by the trigger observable.</typeparam>
/// <param name="triggerObservable">The observable that triggers cycling to the next state.</param>
/// <param name="timeline">The dictionary mapping timeline points to <see cref="LightParameters"/>.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> AddCycle<T>(IObservable<T> triggerObservable,
Dictionary<ITimeline, LightParameters> timeline, TimeSpan? transitionTimeForTimelineState = null);
Expand All @@ -83,7 +83,7 @@ ILightTransitionPipelineConfigurator<TLight> AddCycle<T>(IObservable<T> triggerO
/// <typeparam name="T">The type of values emitted by the trigger observable.</typeparam>
/// <param name="triggerObservable">The observable that triggers cycling to the next state.</param>
/// <param name="timelineFactory">A factory function that creates the timeline mapping based on the pipeline context.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> AddCycle<T>(IObservable<T> triggerObservable,
Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> timelineFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ILightTransitionPipelineConfigurator<TLight> AddToggle<T>(IObservable<T> trigger
/// <typeparam name="T">The type of values emitted by the trigger observable.</typeparam>
/// <param name="triggerObservable">The observable that triggers toggling to the next state.</param>
/// <param name="timeline">The dictionary mapping timeline points to <see cref="LightParameters"/>.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> AddToggle<T>(IObservable<T> triggerObservable,
Dictionary<ITimeline, LightParameters> timeline, TimeSpan? transitionTimeForTimelineState = null);
Expand All @@ -105,7 +105,7 @@ ILightTransitionPipelineConfigurator<TLight> AddToggle<T>(IObservable<T> trigger
/// <typeparam name="T">The type of values emitted by the trigger observable.</typeparam>
/// <param name="triggerObservable">The observable that triggers toggling to the next state.</param>
/// <param name="timelineFactory">A factory function that creates the timeline mapping based on the pipeline context.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> AddToggle<T>(IObservable<T> triggerObservable,
Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> timelineFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ ILightTransitionPipelineConfigurator<TLight> Switch(IObservable<bool> observable
/// <typeparam name="TObservable">The type of the observable to resolve from the service provider.</typeparam>
/// <param name="trueTimeline">The timeline to apply when the observable emits true.</param>
/// <param name="falseTimeline">The timeline to apply when the observable emits false.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> Switch<TObservable>(Dictionary<ITimeline, LightParameters> trueTimeline,
Dictionary<ITimeline, LightParameters> falseTimeline, TimeSpan? transitionTimeForTimelineState = null)
Expand All @@ -318,7 +318,7 @@ ILightTransitionPipelineConfigurator<TLight> Switch<TObservable>(Dictionary<ITim
/// <param name="observable">The observable that determines which timeline to apply.</param>
/// <param name="trueTimeline">The timeline to apply when the observable emits true.</param>
/// <param name="falseTimeline">The timeline to apply when the observable emits false.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> Switch(IObservable<bool> observable,
Dictionary<ITimeline, LightParameters> trueTimeline, Dictionary<ITimeline, LightParameters> falseTimeline,
Expand All @@ -334,7 +334,7 @@ ILightTransitionPipelineConfigurator<TLight> Switch(IObservable<bool> observable
/// <typeparam name="TObservable">The type of the observable to resolve from the service provider.</typeparam>
/// <param name="trueTimelineFactory">A factory function that creates the timeline for true values.</param>
/// <param name="falseTimelineFactory">A factory function that creates the timeline for false values.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> Switch<TObservable>(
Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> trueTimelineFactory,
Expand All @@ -350,7 +350,7 @@ ILightTransitionPipelineConfigurator<TLight> Switch<TObservable>(
/// <param name="observable">The observable that determines which timeline to apply.</param>
/// <param name="trueTimelineFactory">A factory function that creates the timeline for true values.</param>
/// <param name="falseTimelineFactory">A factory function that creates the timeline for false values.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> Switch(IObservable<bool> observable,
Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> trueTimelineFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ ILightTransitionPipelineConfigurator<TLight> TurnOnOffWhen<TWhenObservable>(IObs
/// <param name="switchObservable">The observable that selects which timeline to apply.</param>
/// <param name="trueTimeline">The timeline to apply when the switch observable emits true.</param>
/// <param name="falseTimeline">The timeline to apply when the switch observable emits false.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> SwitchWhen(IObservable<bool> whenObservable,
IObservable<bool> switchObservable, Dictionary<ITimeline, LightParameters> trueTimeline,
Expand All @@ -509,7 +509,7 @@ ILightTransitionPipelineConfigurator<TLight> SwitchWhen(IObservable<bool> whenOb
/// <typeparam name="TSwitchObservable">The type of the branch-selecting observable to resolve from the service provider.</typeparam>
/// <param name="trueTimeline">The timeline to apply when the switch observable emits true.</param>
/// <param name="falseTimeline">The timeline to apply when the switch observable emits false.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> SwitchWhen<TWhenObservable, TSwitchObservable>(
Dictionary<ITimeline, LightParameters> trueTimeline, Dictionary<ITimeline, LightParameters> falseTimeline,
Expand All @@ -525,7 +525,7 @@ ILightTransitionPipelineConfigurator<TLight> SwitchWhen<TWhenObservable, TSwitch
/// <param name="switchObservable">The observable that selects which timeline to apply.</param>
/// <param name="trueTimeline">The timeline to apply when the switch observable emits true.</param>
/// <param name="falseTimeline">The timeline to apply when the switch observable emits false.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> SwitchWhen<TWhenObservable>(IObservable<bool> switchObservable,
Dictionary<ITimeline, LightParameters> trueTimeline, Dictionary<ITimeline, LightParameters> falseTimeline,
Expand All @@ -541,7 +541,7 @@ ILightTransitionPipelineConfigurator<TLight> SwitchWhen<TWhenObservable>(IObserv
/// <param name="switchObservable">The observable that selects which timeline to apply.</param>
/// <param name="trueTimelineFactory">A factory function that creates the timeline for true values.</param>
/// <param name="falseTimelineFactory">A factory function that creates the timeline for false values.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> SwitchWhen(IObservable<bool> whenObservable,
IObservable<bool> switchObservable,
Expand All @@ -557,7 +557,7 @@ ILightTransitionPipelineConfigurator<TLight> SwitchWhen(IObservable<bool> whenOb
/// <typeparam name="TSwitchObservable">The type of the branch-selecting observable to resolve from the service provider.</typeparam>
/// <param name="trueTimelineFactory">A factory function that creates the timeline for true values.</param>
/// <param name="falseTimelineFactory">A factory function that creates the timeline for false values.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> SwitchWhen<TWhenObservable, TSwitchObservable>(
Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> trueTimelineFactory,
Expand All @@ -574,7 +574,7 @@ ILightTransitionPipelineConfigurator<TLight> SwitchWhen<TWhenObservable, TSwitch
/// <param name="switchObservable">The observable that selects which timeline to apply.</param>
/// <param name="trueTimelineFactory">A factory function that creates the timeline for true values.</param>
/// <param name="falseTimelineFactory">A factory function that creates the timeline for false values.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> SwitchWhen<TWhenObservable>(IObservable<bool> switchObservable,
Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> trueTimelineFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ ILightTransitionPipelineConfigurator<TLight> AddPipelineWhen(IObservable<bool> o
/// </summary>
/// <typeparam name="TObservable">The type of the observable to resolve from the service provider.</typeparam>
/// <param name="timeline">The dictionary mapping timeline points to <see cref="LightParameters"/>.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> When<TObservable>(Dictionary<ITimeline, LightParameters> timeline,
TimeSpan? transitionTimeForTimelineState = null)
Expand All @@ -270,7 +270,7 @@ ILightTransitionPipelineConfigurator<TLight> When<TObservable>(Dictionary<ITimel
/// </summary>
/// <param name="observable">The observable that determines when to apply the timeline.</param>
/// <param name="timeline">The dictionary mapping timeline points to <see cref="LightParameters"/>.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> When(IObservable<bool> observable,
Dictionary<ITimeline, LightParameters> timeline, TimeSpan? transitionTimeForTimelineState = null);
Expand All @@ -283,7 +283,7 @@ ILightTransitionPipelineConfigurator<TLight> When(IObservable<bool> observable,
/// </summary>
/// <typeparam name="TObservable">The type of the observable to resolve from the service provider.</typeparam>
/// <param name="timelineFactory">A factory function that creates the timeline mapping based on the pipeline context.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> When<TObservable>(
Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> timelineFactory,
Expand All @@ -297,7 +297,7 @@ ILightTransitionPipelineConfigurator<TLight> When<TObservable>(
/// </summary>
/// <param name="observable">The observable that determines when to apply the timeline.</param>
/// <param name="timelineFactory">A factory function that creates the timeline mapping based on the pipeline context.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 500ms if null.</param>
/// <param name="transitionTimeForTimelineState">The duration of the initial fade from the current state. Defaults to 400ms if null.</param>
/// <returns>The configurator instance for method chaining.</returns>
ILightTransitionPipelineConfigurator<TLight> When(IObservable<bool> observable,
Func<IServiceProvider, Dictionary<ITimeline, LightParameters>> timelineFactory,
Expand Down
Loading
Loading