diff options
author | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2019-02-05 13:25:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-05 13:25:43 +0100 |
commit | 369967f27b39d35b1d40d36b558d7ba6658e05a7 (patch) | |
tree | 24506360eaa806d8f391dbfcfaa11962c9ffe155 /collectors | |
parent | 21261e8c70bbe2c38f5937e23db5df33cc76b192 (diff) |
Remove codacy warnings from sma_webbox (#5330)
* Remove codacy warnings
* try let and const in the scope instead
Diffstat (limited to 'collectors')
-rw-r--r-- | collectors/node.d.plugin/sma_webbox/sma_webbox.node.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/collectors/node.d.plugin/sma_webbox/sma_webbox.node.js b/collectors/node.d.plugin/sma_webbox/sma_webbox.node.js index b9a168adcd..aa60ae8162 100644 --- a/collectors/node.d.plugin/sma_webbox/sma_webbox.node.js +++ b/collectors/node.d.plugin/sma_webbox/sma_webbox.node.js @@ -73,10 +73,11 @@ var webbox = { if(found > 0 && service.added !== true) service.commit(); + // Grid Current Power Chart if(d['GriPwr'].value !== null) { - var id = 'smawebbox_' + service.name + '.current'; - var chart = webbox.charts[id]; + const id = 'smawebbox_' + service.name + '.current'; + let chart = webbox.charts[id]; if(typeof chart === 'undefined') { chart = { @@ -111,8 +112,8 @@ var webbox = { } if(d['GriEgyTdy'].value !== null) { - var id = 'smawebbox_' + service.name + '.today'; - var chart = webbox.charts[id]; + const id = 'smawebbox_' + service.name + '.today'; + let chart = webbox.charts[id]; if(typeof chart === 'undefined') { chart = { @@ -147,8 +148,8 @@ var webbox = { } if(d['GriEgyTot'].value !== null) { - var id = 'smawebbox_' + service.name + '.total'; - var chart = webbox.charts[id]; + const id = 'smawebbox_' + service.name + '.total'; + let chart = webbox.charts[id]; if(typeof chart === 'undefined') { chart = { |