Skip to content

Commit

Permalink
Update all comments referencing Watts
Browse files Browse the repository at this point in the history
Addresses #262.
  • Loading branch information
mihai-dinculescu committed Oct 21, 2024
1 parent f17986e commit f5b045d
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ file. This change log follows the conventions of
- `PlugPowerStripHandler` has been renamed to `PowerStripPlugHandler` to be consistent with the rest of the library.
- `PlugPowerStripResult` has been renamed to `PowerStripPlugResult` to be consistent with the rest of the library.

### Fixed

- Updated all comments referencing Watts to confirm the correct units are specified.

## [Python Unreleased][Unreleased]

### Added
Expand All @@ -26,6 +30,10 @@ file. This change log follows the conventions of

- The `openssl` dependency has been replaced with native Rust alternatives to expand cross-compilation options, such as for Android, and to decrease build times (thanks to @rbock44).

### Fixed

- Updated all comments referencing Watts to confirm the correct units are specified.

## [Rust v0.7.16][v0.7.16] - 2024-09-27

### Added
Expand Down
2 changes: 1 addition & 1 deletion tapo-py/tapo-py/tapo/responses/current_power_result.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class CurrentPowerResult:
"""Contains the current power reading of the device."""

current_power: int
"""Current power in watts (W)."""
"""Current power in Watts (W)."""

def to_dict(self) -> dict:
"""Gets all the properties of this result as a dictionary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ class DeviceUsageEnergyMonitoringResult:
time_usage: UsageByPeriodResult
"""Time usage in minutes."""
power_usage: UsageByPeriodResult
"""Power usage in watt-hour (Wh)."""
"""Power usage in Watt Hours (Wh)."""
saved_power: UsageByPeriodResult
"""Saved power in watt-hour (Wh)."""
"""Saved power in Watt Hours (Wh)."""

def to_dict(self) -> dict:
"""Gets all the properties of this result as a dictionary.
Expand Down
2 changes: 1 addition & 1 deletion tapo-py/tapo-py/tapo/responses/energy_data_result.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class EnergyDataResult:
"""Local time of the device."""

data: List[int]
"""Energy data for the given `interval` in watts (W)."""
"""Energy data for the given `interval` in Watt Hours (Wh)."""

start_timestamp: int
"""Start timestamp of the interval in milliseconds. This value is provided
Expand Down
6 changes: 3 additions & 3 deletions tapo-py/tapo-py/tapo/responses/energy_usage_result.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ class EnergyUsageResult:
local_time: datetime
"""Local time of the device."""
current_power: int
"""Current power in milliwatts (mW)."""
"""Current power in Milliwatts (mW)."""
today_runtime: int
"""Today runtime in minutes."""
today_energy: int
"""Today energy usage in watts (W)."""
"""Today energy usage in Watt Hours (Wh)."""
month_runtime: int
"""Current month runtime in minutes."""
month_energy: int
"""Current month energy usage in watts (W)."""
"""Current month energy usage in Watt Hours (Wh)."""

def to_dict(self) -> dict:
"""Gets all the properties of this result as a dictionary.
Expand Down
2 changes: 1 addition & 1 deletion tapo/src/responses/current_power_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::responses::TapoResponseExt;
#[derive(Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "python", pyo3::prelude::pyclass(get_all))]
pub struct CurrentPowerResult {
/// Current power in watts (W).
/// Current power in Watts (W).
pub current_power: u64,
}
impl TapoResponseExt for CurrentPowerResult {}
Expand Down
4 changes: 2 additions & 2 deletions tapo/src/responses/device_usage_energy_monitoring_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use super::{TapoResponseExt, UsageByPeriodResult};
pub struct DeviceUsageEnergyMonitoringResult {
/// Time usage in minutes.
pub time_usage: UsageByPeriodResult,
/// Power usage in watt-hour (Wh).
/// Power usage in Watt Hours (Wh).
pub power_usage: UsageByPeriodResult,
/// Saved power in watt-hour (Wh).
/// Saved power in Watt Hours (Wh).
pub saved_power: UsageByPeriodResult,
}
impl TapoResponseExt for DeviceUsageEnergyMonitoringResult {}
Expand Down
2 changes: 1 addition & 1 deletion tapo/src/responses/energy_data_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub struct EnergyDataResult {
/// Local time of the device.
#[serde(deserialize_with = "der_tapo_datetime_format")]
pub local_time: NaiveDateTime,
/// Energy data for the given `interval` in watts (W).
/// Energy data for the given `interval` in Watt Hours (Wh).
pub data: Vec<u64>,
/// Start timestamp of the interval in milliseconds. This value is provided
/// in the `get_energy_data` request and is passed through. Note that
Expand Down
6 changes: 3 additions & 3 deletions tapo/src/responses/energy_usage_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ pub struct EnergyUsageResult {
/// Local time of the device.
#[serde(deserialize_with = "der_tapo_datetime_format")]
pub local_time: NaiveDateTime,
/// Current power in milliwatts (mW).
/// Current power in Milliwatts (mW).
pub current_power: u64,
/// Today runtime in minutes.
pub today_runtime: u64,
/// Today energy usage in watts (W).
/// Today energy usage in Watt Hours (Wh).
pub today_energy: u64,
/// Current month runtime in minutes.
pub month_runtime: u64,
/// Current month energy usage in watts (W).
/// Current month energy usage in Watt Hours (Wh).
pub month_energy: u64,
}
impl TapoResponseExt for EnergyUsageResult {}
Expand Down

0 comments on commit f5b045d

Please sign in to comment.