Github Mirror / telegraf-plugins: 2507c37e




BatteryPower will be negative when the battery is discharging

BatteryPower will be negative when the battery is discharging

Commit 2507c37e.

Authored 2023-05-31T13:59:05.000+01:00 by B Tasker in project Github Mirror / telegraf-plugins

+7 lines -1 lines

Commit Signature

Changes

diff --git a/soliscloud/soliscloud.py b/soliscloud/soliscloud.py
--- a/soliscloud/soliscloud.py
+++ b/soliscloud/soliscloud.py
# @@ -477,9 +477,15 @@ def extractBatteryStats(inverter, config):
# "batteryTodayChargeEnergyStr": f'"{inverter["batteryTodayChargeEnergyStr"]}"',
# "batteryTodayDischargeEnergy": float(inverter['batteryTodayDischargeEnergy']),
# "batteryTodayDischargeEnergyStr": f'"{inverter["batteryTodayDischargeEnergyStr"]}"',
# - "readingAge" : f"{round(time.time() - int(inverter['dataTimestamp']))}i"
# + "readingAge" : f"{round(time.time() - int(inverter['dataTimestamp']))}i",
# +
# }
#
# + tags["batteryState"] = "charging"
# + if fields["batteryPower"] < 0:
# + tags["batteryState"] = "discharging"
# +
# +
# # Construct the LP
# lp1 = [config['measurement']]
# for tag in tags:
#