From c51a4eff427c85d02cb4d9ae0ecd2849836b75b8 Mon Sep 17 00:00:00 2001 From: neilkplugins Date: Sun, 26 Apr 2020 12:08:15 +0100 Subject: [PATCH] Update plugin.py remove some excessive debug loggin --- OctopusEnergy.indigoPlugin/Contents/Server Plugin/plugin.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OctopusEnergy.indigoPlugin/Contents/Server Plugin/plugin.py b/OctopusEnergy.indigoPlugin/Contents/Server Plugin/plugin.py index aecbb65..0b8ccb3 100755 --- a/OctopusEnergy.indigoPlugin/Contents/Server Plugin/plugin.py +++ b/OctopusEnergy.indigoPlugin/Contents/Server Plugin/plugin.py @@ -27,8 +27,6 @@ # This is the upper rate cap for Agile Octopus, presumably this could change but it is currently not in the API # Maybe this should be a plugin config option, but if it doesn't change often then it adds complexity CAPPED_RATE = 35 -# Initialise the daily update flag -daily_update = 0 ################################################################################ @@ -128,7 +126,7 @@ def update(self,device): else: self.debugLog("Error in getting current tariffs") - # The standing charge, max and min values only need to be updated once a day + # The standing charge, max and min values only need to be updated once a day, so set the flag accordingly if str(utctoday) != device.states["UTC_Today"]: self.debugLog("Updating daily values for max, min and standing charge") update_daily_rate = True @@ -140,7 +138,6 @@ def update(self,device): # This is the current rate cap for Agile Octopus, min value should always be lower than this, currently hard coded in the plugin as not published by the api min_rate = CAPPED_RATE for rates in half_hourly_rates: - self.debugLog(rates) sum_rates = sum_rates + rates["value_inc_vat"] if rates["value_inc_vat"] >= max_rate: max_rate = rates["value_inc_vat"]