mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-06 10:44:04 +00:00
Prepare 0.4.0.dev3 (#172)
* Prepare 0.4.0.dev3 Most notable changes: * Devices initialized by discovery are pre-initialized using the discovery response data, so no need for update() directly after discovery * Only the basic information is requested during discovery, as some HS110 and HS220 devices do not respond to multi-module queries * Fix mac address parsing for KL430 * Add support for KL125 color temperature ranges * Documentation updates! * add types-click for mypy hook * use generator expression for sum
This commit is contained in:
@@ -143,7 +143,7 @@ class SmartStrip(SmartDevice):
|
||||
|
||||
async def current_consumption(self) -> float:
|
||||
"""Get the current power consumption in watts."""
|
||||
consumption = sum([await plug.current_consumption() for plug in self.children])
|
||||
consumption = sum(await plug.current_consumption() for plug in self.children)
|
||||
|
||||
return consumption
|
||||
|
||||
|
Reference in New Issue
Block a user