Table of Contents

Class LightTransitionModule

Namespace
KasaTapoClient
Assembly
KasaTapoClient.dll

Provides module-style access to light transition configuration.

public sealed class LightTransitionModule
Inheritance
LightTransitionModule
Inherited Members

Properties

ChangeTransitionEnabled

Gets whether fading between settings is enabled, or null when unsupported or unavailable.

public bool? ChangeTransitionEnabled { get; }

Property Value

bool?

IsAvailable

Gets a value indicating whether transition configuration is currently available.

public bool IsAvailable { get; }

Property Value

bool

State

Gets the latest light transition module state.

public LightTransitionState? State { get; }

Property Value

LightTransitionState

SupportsChangeTransition

Gets whether the device has reported support for fading between settings while the light is on.

public bool SupportsChangeTransition { get; }

Property Value

bool

TransitionOffSeconds

Gets the transition-off duration in seconds.

public int? TransitionOffSeconds { get; }

Property Value

int?

TransitionOnSeconds

Gets the transition-on duration in seconds.

public int? TransitionOnSeconds { get; }

Property Value

int?

Methods

SetChangeTransitionEnabledAsync(bool, CancellationToken)

Enables or disables fading between light settings, then refreshes device state.

public Task SetChangeTransitionEnabledAsync(bool enabled, CancellationToken cancellationToken = default)

Parameters

enabled bool

Whether changes should fade between settings.

cancellationToken CancellationToken

The cancellation token for the operation.

Returns

Task

A task that completes after device state has been refreshed.

Exceptions

NotSupportedException

The device has not reported change-transition support.

SetEnabledAsync(bool, CancellationToken)

Enables or disables persistent smooth transitions when supported by the device.

public Task SetEnabledAsync(bool enabled, CancellationToken cancellationToken = default)

Parameters

enabled bool
cancellationToken CancellationToken

Returns

Task

SetTurnOffTransitionAsync(int, CancellationToken)

Sets the persistent turn-off transition duration in seconds. Specify 0 to disable the turn-off transition.

public Task SetTurnOffTransitionAsync(int seconds, CancellationToken cancellationToken = default)

Parameters

seconds int
cancellationToken CancellationToken

Returns

Task

SetTurnOnTransitionAsync(int, CancellationToken)

Sets the persistent turn-on transition duration in seconds. Specify 0 to disable the turn-on transition.

public Task SetTurnOnTransitionAsync(int seconds, CancellationToken cancellationToken = default)

Parameters

seconds int
cancellationToken CancellationToken

Returns

Task

UpdateAsync(CancellationToken)

Refreshes light transition state.

public Task UpdateAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task