kellerza / sunsynk

Deye/Sunsynk Inverter Python library and Home Assistant OS Addon
https://kellerza.github.io/sunsynk/
MIT License
229 stars 95 forks source link

Signed NumberRWSensor #146

Closed kellerza closed 1 year ago

kellerza commented 1 year ago

Fixes #145 and allow reading & writing negative NumberRWSensor (for single register sensors)

NumberRWSensor(206, "Grid Trickle Feed", WATT, -1, min=-500, max=500)
codecov[bot] commented 1 year ago

Codecov Report

Merging #146 (2e1d352) into main (aa859d4) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #146   +/-   ##
=======================================
  Coverage   97.15%   97.16%           
=======================================
  Files          10       10           
  Lines         632      634    +2     
=======================================
+ Hits          614      616    +2     
  Misses         18       18           
Impacted Files Coverage Δ
sunsynk/helpers.py 100.00% <100.00%> (ø)
sunsynk/rwsensors.py 98.44% <100.00%> (+0.02%) :arrow_up: