Table of Contents

Class UsageModule

Namespace
KasaTapoClient
Assembly
KasaTapoClient.dll

Provides module-style access to usage telemetry for a device.

public sealed class UsageModule
Inheritance
UsageModule
Inherited Members

Properties

CurrentPowerWatts

Gets the latest current power draw in watts.

public double? CurrentPowerWatts { get; }

Property Value

double?

IsAvailable

Gets a value indicating whether usage telemetry is currently available.

public bool IsAvailable { get; }

Property Value

bool

MonthKilowattHours

Gets this month's measured energy in kilowatt-hours.

public double? MonthKilowattHours { get; }

Property Value

double?

State

Gets the latest usage snapshot.

public EnergyUsage? State { get; }

Property Value

EnergyUsage

TodayKilowattHours

Gets today's measured energy in kilowatt-hours.

public double? TodayKilowattHours { get; }

Property Value

double?

TotalKilowattHours

Gets the latest total measured energy in kilowatt-hours.

public double? TotalKilowattHours { get; }

Property Value

double?

Methods

UpdateAsync(CancellationToken)

Refreshes usage telemetry from the device.

public Task<bool> UpdateAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

The cancellation token for the operation.

Returns

Task<bool>

true when the device returned usage telemetry; otherwise, false.