mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-12-25 06:00:24 +00:00
Fix year emeter for cli by using kwarg for year parameter (#372)
* Fix year emeter for cli by using kwarg for year parameter * Improve tests * Skip test_emeter on python3.7
This commit is contained in:
@@ -297,7 +297,7 @@ async def emeter(dev: SmartDevice, year, month, erase):
|
||||
if year:
|
||||
click.echo(f"== For year {year.year} ==")
|
||||
click.echo("Month, usage (kWh)")
|
||||
usage_data = await dev.get_emeter_monthly(year.year)
|
||||
usage_data = await dev.get_emeter_monthly(year=year.year)
|
||||
elif month:
|
||||
click.echo(f"== For month {month.month} of {month.year} ==")
|
||||
click.echo("Day, usage (kWh)")
|
||||
|
||||
Reference in New Issue
Block a user