Table of Contents

Class RuleModule

Namespace
KasaTapoClient
Assembly
KasaTapoClient.dll

Provides module-style access to countdown, schedule, and antitheft rules.

public sealed class RuleModule
Inheritance
RuleModule
Inherited Members

Properties

AntitheftRules

Gets the latest antitheft rules.

public IReadOnlyList<ScheduledRule> AntitheftRules { get; }

Property Value

IReadOnlyList<ScheduledRule>

Countdown

Gets the latest countdown timer state.

public CountdownRuleState? Countdown { get; }

Property Value

CountdownRuleState

Schedules

Gets the latest schedule rules.

public IReadOnlyList<ScheduledRule> Schedules { get; }

Property Value

IReadOnlyList<ScheduledRule>

State

Gets the latest normalized rule state.

public RuleModuleState? State { get; }

Property Value

RuleModuleState

Methods

UpdateAsync(CancellationToken)

Refreshes the device state, including rule-related modules.

public Task UpdateAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token for the operation.

Returns

Task

A task that completes when the device state has been refreshed.