kellerza / pysma

Async library for SMA Solar's WebConnect interface
MIT License
59 stars 51 forks source link

Refactored read_logger #70

Closed rklomp closed 3 years ago

rklomp commented 3 years ago

This splits the read_logger method in read_logger and read_dash_logger The sensors parameter of read_logger is replaced by log_id

extract_logger is not needed anymore in Sensor and removed.

I will add some test later this week to cover these methods.

codecov[bot] commented 3 years ago

Codecov Report

Merging #70 (624d71d) into master (fa54814) will increase coverage by 2.94%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
+ Coverage   95.81%   98.75%   +2.94%     
==========================================
  Files           6        6              
  Lines         406      401       -5     
==========================================
+ Hits          389      396       +7     
+ Misses         17        5      -12     
Impacted Files Coverage Ξ”
pysma/__init__.py 97.12% <100.00%> (+6.16%) :arrow_up:
pysma/sensor.py 100.00% <100.00%> (+1.11%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update fa54814...624d71d. Read the comment docs.

rklomp commented 3 years ago

Looks fine with me, I will have no problems incorporating the changes.

Thanks for the review! I will merge this pull request

One question, where do you get the 'log_id (int): The ID of the log to read.' definitions? You must access to some document that I haven't seen, I grabbed the two I use from the web session but you have a nice list with names.

I found these while searching for your key (28704) in the /scripts/scripts.xxxxxxxx.js file from the webgui 😁

sillygoose commented 3 years ago

I found these while searching for your key (28704) in the /scripts/scripts.xxxxxxxx.js file from the webgui 😁

I searched all over the web but didn't look in any .js files. I did grab the tags and metadata files so I could test promising sensor keys but I can now use your nice discovery.