From 947abe706adcb1c8d0d237f6d60317a83d48b3f8 Mon Sep 17 00:00:00 2001 From: Ian Hampton Date: Fri, 20 Nov 2020 14:57:59 +0000 Subject: [PATCH] Update octopus-switch.js var -> const --- octopus-switch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/octopus-switch.js b/octopus-switch.js index 090df8b..2294d23 100755 --- a/octopus-switch.js +++ b/octopus-switch.js @@ -41,8 +41,8 @@ const unit = (segments_ahead <= 2) ? "hr" : "hrs"; const url = `${api_url}products/${product_code}/electricity-tariffs/${tariff_code}/standard-unit-rates/?period_from=${now}`; async function controlSwitch(state) { - var count = 0; - var retry = 5; + const count = 0; + const retry = 5; while (true) { try { if (state == "log") {