Github Mirror / telegraf-plugins: 0cb1868b




Generate a line of line protocol with meter information

Generate a line of line protocol with meter information

Commit 0cb1868b.

Authored 2023-07-05T17:17:50.000+01:00 by B Tasker in project Github Mirror / telegraf-plugins

+6 lines -1 lines

Commit Signature

Changes

diff --git a/octopus-tariffs/octopus-tariffs.py b/octopus-tariffs/octopus-tariffs.py
--- a/octopus-tariffs/octopus-tariffs.py
+++ b/octopus-tariffs/octopus-tariffs.py
# @@ -126,6 +126,7 @@ def main(api_key, octo_account):
# account = result.json()
#
# addresses = []
# + lp_buffer = []
# # Iterate through addresses
# for prop in account['properties']:
# prop_info = {
# @@ -154,11 +155,15 @@ def main(api_key, octo_account):
# # Get tariff info
# meter_info = getPricing(meter_info, session)
#
# + # Create some LP for the meter itself
# + lp = f'octopus_meter,mpan={meter_info["mpan"]},property={prop_info["id"]},account={prop_info["account_number"]} start_date="{prop_info["start_date"]}"'
# + lp_buffer.append(lp)
# +
# prop_info['meters'].append(meter_info)
# addresses.append(prop_info)
#
# # Turn it into LP
# - lp_buffer = generateLP(addresses)
# + lp_buffer = lp_buffer + generateLP(addresses)
# [print(x) for x in lp_buffer]
#
#
#