From d91deaa1e0aae216785ca7a78e59eb69f59166aa Mon Sep 17 00:00:00 2001 From: Stephen Newey Date: Mon, 10 Jun 2019 16:08:43 +0100 Subject: [PATCH] Fix Agile rates during summer time --- app/Dockerfile | 2 +- app/octopus_to_influxdb.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Dockerfile b/app/Dockerfile index 0e9bf11..23646a7 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.6 +FROM python:3.7 LABEL maintainer="Stephen Newey " diff --git a/app/octopus_to_influxdb.py b/app/octopus_to_influxdb.py index cb70026..01298cc 100644 --- a/app/octopus_to_influxdb.py +++ b/app/octopus_to_influxdb.py @@ -79,7 +79,7 @@ def store_series(connection, series, metrics, rate_data): if agile_data: agile_standing_charge = rate_data['agile_standing_charge'] / 48 agile_unit_rate = agile_rates.get( - measurement['interval_end'], + maya.parse(measurement['interval_end']).iso8601(), rate_data[rate] # cludge, use Go rate during DST changeover ) agile_cost = agile_unit_rate * consumption