python-kasa/kasa/tests
Julian Davis 43ed47eca8
Return usage.get_{monthstat,daystat} in expected format (#394)
* Basic fix for issue: https://github.com/python-kasa/python-kasa/issues/373
Change usage module get_daystat and get_monthat to return dictionaries of date index: time values as spec'd instead of raw usage data. Output matches emeter module get_daystat and get_monthstat

* Fixed some formatting and lint warnings to comply with black/flake8
Use the new _convert function in emeter for all conversions rather than the one in smartdevice.py
Removed unused function _emeter_convert_emeter_data from smartdevice.py

* Added a first pass test module for testing the new usage conversion function

* Changes based on PR feedback
Tidied up some doc string comments
Added a check for explicit values from conversion function

* Rebase on top of current master, fix docstrings

---------

Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
2023-02-18 20:53:02 +01:00
..
fixtures Add fixtures for KS200M (#356) 2022-06-28 18:53:23 +02:00
__init__.py mass rename to (python-)kasa (#1) 2019-12-18 09:11:18 +01:00
conftest.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
newfakes.py Add support for bulb presets (#379) 2022-10-23 00:15:47 +02:00
test_bulb.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
test_cli.py Use rich for prettier output, if available (#403) 2023-02-18 17:31:06 +01:00
test_dimmer.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
test_discovery.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
test_emeter.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
test_lightstrip.py Add transition parameter to lightstrip's set_effect (#416) 2023-02-18 18:03:54 +01:00
test_plug.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
test_protocol.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
test_readme_examples.py Keep connection open and lock to prevent duplicate requests (#213) 2021-09-24 23:25:43 +02:00
test_smartdevice.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
test_strip.py Fix pytest warnings about asyncio (#397) 2022-11-13 23:34:47 +01:00
test_usage.py Return usage.get_{monthstat,daystat} in expected format (#394) 2023-02-18 20:53:02 +01:00