small fixes

This commit is contained in:
bohdan-s
2022-04-07 10:55:44 +10:00
parent f8f27e9c48
commit 8819695c7c
5 changed files with 3583 additions and 2 deletions
+1 -1
View File
@@ -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>
+3 -1
View File
@@ -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
View File
@@ -1,4 +1,5 @@
version: 0.2.0
vendor: Sungrow
registers:
- read:
- name: "protocol_number"