mirror of
https://github.com/alexhopeoconnor/SunGather.git
synced 2026-10-04 02:48:12 +10:00
small fixes
This commit is contained in:
@@ -262,7 +262,7 @@ Distributed under the GPL3 License. See `LICENSE.txt` for more information.
|
||||
<!-- CONTACT -->
|
||||
## Contact
|
||||
|
||||
Project Link: [https://github.com/bohdan-s/SungrowModbusWebClient](https://github.com/bohdan-s/SungrowModbusWebClient)
|
||||
Project Link: [https://github.com/bohdan-s/SunGather](https://github.com/bohdan-s/SunGather)
|
||||
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
|
||||
|
||||
@@ -166,7 +166,9 @@ class export_pvoutput(object):
|
||||
value = int(self.collected_data[field])
|
||||
elif x == 6 or x == 7: # Round to 1 decimal place
|
||||
value = round(self.collected_data[field] / self.collected_data['count'], 1)
|
||||
else: # Getting errors when uploading decimals for power/energy so return INT
|
||||
if not (value >= (self.collected_data[field] * 0.9) and value <= (self.collected_data[field] * 1.1)): # Trim outlier (i.e. inverter does not report every time during interval)
|
||||
value = int(self.collected_data[field])
|
||||
else: # Getting errors when uploading decimals for power/energy so return INT
|
||||
value = int((self.collected_data[field] / self.collected_data['count']))
|
||||
data_point = data_point + "," + str(value)
|
||||
any_data = True
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
version: 0.2.0
|
||||
vendor: Sungrow
|
||||
registers:
|
||||
- read:
|
||||
- name: "protocol_number"
|
||||
|
||||
Reference in New Issue
Block a user