Github Mirror / telegraf-plugins: 4a7184c7




Only emit pricing information if it flows in the correct direction utilities/telegraf-plugins#17

Only emit pricing information if it flows in the correct direction utilities/telegraf-plugins#17

During export account setup, an import tariff may temporarily be associated. Don't emit import pricing when this happens - export mpans should only link in export tariffs.

Commit 4a7184c7.

Authored 2023-07-24T17:14:00.000+01:00 by B Tasker in project Github Mirror / telegraf-plugins

+6 lines -2 lines

Commit Signature

Changes

diff --git a/octopus-energy/octopus-energy.py b/octopus-energy/octopus-energy.py
--- a/octopus-energy/octopus-energy.py
+++ b/octopus-energy/octopus-energy.py
# @@ -129,7 +129,12 @@ def generateLP(addresses):
#
# # Iterate through prices
# for price in meter['pricing']:
# - lp_buffer = lp_buffer + priceToLP(price, meter['tariff-code'])
# + # Don't output pricing information that flows in the wrong direction
# + #
# + # See comment on utilities/telegraf-plugins#17 for why this is needed
# + if ((meter['is_export'] and price['tariff_direction'] == "EXPORT") or
# + (not meter['is_export'] and price['tariff_direction'] == "IMPORT")):
# + lp_buffer = lp_buffer + priceToLP(price, meter['tariff-code'])
#
# # and through consumption
# if "consumption" in meter:
# @@ -302,7 +307,6 @@ def main(api_key, octo_account):
#
#
# # Turn it into LP
# - print(addresses)
# lp_buffer = lp_buffer + generateLP(addresses)
# [print(x) for x in lp_buffer]
#
#