Class LightStripSegmentModule
- Namespace
- KasaTapoClient
- Assembly
- KasaTapoClient.dll
Provides typed access to physical strip length on devices advertising the segment component.
public sealed class LightStripSegmentModule
- Inheritance
-
LightStripSegmentModule
- Inherited Members
Properties
IsAvailable
Gets whether the device advertises the segment component and has returned segment state.
public bool IsAvailable { get; }
Property Value
SegmentCount
Gets the reported count of 10 cm segments per run, or null when unavailable.
public int? SegmentCount { get; }
Property Value
- int?
State
Gets the latest reported length, or null when unavailable.
public LightStripSegmentState? State { get; }
Property Value
Methods
SetSegmentCountAsync(int, CancellationToken)
Sets the physical strip length; this does not configure colors for individual segments.
public Task SetSegmentCountAsync(int segmentCount, CancellationToken cancellationToken = default)
Parameters
segmentCountintThe count of 10 cm segments per run, from 0 to 50 inclusive.
cancellationTokenCancellationTokenThe cancellation token for the operation.
Returns
- Task
A task that completes after device state has been refreshed.
Exceptions
- ArgumentOutOfRangeException
The count is outside 0 to 50.
- NotSupportedException
The device has not reported segment support and state.
UpdateAsync(CancellationToken)
Refreshes device state, including strip length when the segment component is advertised.
public Task UpdateAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenThe cancellation token for the operation.
Returns
- Task
A task that completes after device state has been refreshed.