python-kasa/kasa/modules
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
..
__init__.py Export modules & make sphinx happy (#334) 2022-04-06 01:41:08 +02:00
ambientlight.py Implement motion & ambient light sensor modules for dimmers (#278) 2022-04-05 19:27:46 +02:00
antitheft.py Add module support & query their information during update cycle (#243) 2022-04-05 19:27:46 +02:00
cloud.py Add module support & query their information during update cycle (#243) 2022-04-05 19:27:46 +02:00
countdown.py Add module support & query their information during update cycle (#243) 2022-04-05 19:27:46 +02:00
emeter.py Return usage.get_{monthstat,daystat} in expected format (#394) 2023-02-18 20:53:02 +01:00
module.py Raise an exception when trying to access data prior updating 2022-04-05 19:27:46 +02:00
motion.py move get_time{zone} out from smartdevice + some minor cleanups 2022-04-05 19:27:46 +02:00
rulemodule.py Add module support & query their information during update cycle (#243) 2022-04-05 19:27:46 +02:00
schedule.py Add module support & query their information during update cycle (#243) 2022-04-05 19:27:46 +02:00
time.py move get_time{zone} out from smartdevice + some minor cleanups 2022-04-05 19:27:46 +02:00
usage.py Return usage.get_{monthstat,daystat} in expected format (#394) 2023-02-18 20:53:02 +01:00