sunspec / pysunspec2

SunSpec Python library for interfacing with SunSpec devices.
Apache License 2.0
57 stars 22 forks source link

Reset sf_value on read #43

Closed mptei closed 14 hours ago

mptei commented 3 years ago

This PR is a possible fix for #42.

On Point.set_mb (which is called by read()) the value of self.sf_value is reset to None.

thecem commented 3 years ago

Tested the change for sf and this brings the solution on devices with dynamic sf, like fronius.

thecem commented 3 years ago

@shelcrow: could you merge this request?

It is already tested, what @mptei adressed and it is working.

thx a lot!

trunet commented 3 years ago

+1 for merging... I tested on my as well and it fixed the problem.

thecem commented 3 years ago

+1 for merging!

purcell-lab commented 3 years ago

+1 fixes issue for me. I understand there is an alternative solution being developed, which is great.

Either way, I currently need to manually update this fix each time I work with upstream libs, so merge or alternative fix would be welcome.

Kudrat9 commented 14 hours ago

The fix for this was committed here: https://github.com/sunspec/pysunspec2/commit/c1e59462a9f7a39eeb0ca94ba09f8d2b02b1a55e