Table of Contents

Class EnergyModule

Namespace
KasaTapoClient
Assembly
KasaTapoClient.dll

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

public sealed class EnergyModule
Inheritance
EnergyModule
Inherited Members

Properties

CurrentAmps

Gets the latest current draw in amps.

public double? CurrentAmps { get; }

Property Value

double?

CurrentPowerWatts

Gets the latest current power draw in watts.

public double? CurrentPowerWatts { get; }

Property Value

double?

IsAvailable

Gets a value indicating whether energy 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?

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?

Usage

Gets the latest energy usage snapshot.

public EnergyUsage? Usage { get; }

Property Value

EnergyUsage

VoltageVolts

Gets the latest line voltage in volts.

public double? VoltageVolts { get; }

Property Value

double?

Methods

UpdateAsync(CancellationToken)

Refreshes energy 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 energy telemetry; otherwise, false.