mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-01-18 01:32:41 +00:00
Rename current_consumption to power
- Note: This is a breaking change. - Fix: Rename `current_consumption` to `power` in energy modules, to deconflict and clarify. - Fix: Report `0` instead of `None` for current when current is zero. - Fix: Report `0` instead of `None` for voltage when voltage is zero (not that this was possible to see).
This commit is contained in:
@@ -51,8 +51,8 @@ class Emeter(Usage, EnergyInterface):
|
||||
return data.get(current_month, 0.0)
|
||||
|
||||
@property
|
||||
def current_consumption(self) -> float | None:
|
||||
"""Get the current power consumption in Watt."""
|
||||
def power(self) -> float | None:
|
||||
"""Get the current power draw in Watts."""
|
||||
return self.status.power
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user