From 331c85aa5c082ad7d4196ee7c30de1da4ac0ed22 Mon Sep 17 00:00:00 2001 From: Andre-0815-4711 <125686884+Andre-0815-4711@users.noreply.github.com> Date: Thu, 25 Jan 2024 12:31:52 +0100 Subject: [PATCH] Update main.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _wallboxPlugStateLocal hinzugefĆ¼gt --- main.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index 989c970..fd09a6a 100644 --- a/main.js +++ b/main.js @@ -91,7 +91,11 @@ const _wallboxChargemodeLocal = { 3: 'Green' }; - +const _wallboxPlugStateLocal = { + 0: 'Not Connected', + 1: 'Connected', + 2: 'Charging' +}; let adapter; const adapterName = require('./package.json').name.split('.').pop(); @@ -580,7 +584,12 @@ async function requestLocalAPI(root_dataPoints, information_dataPoints, data_dat if (type == 7 && key == '1') { data = data !== undefined ? _wallboxChargemodeLocal[data] : 'Undefined'; } - + + // State for chargemode Wallbox Type 7 + if (type == 7 && key == '26') { + data = data !== undefined ? _wallboxPlugStateLocal[data] : 'Undefined'; + } + await setDataPoint(dataPoint, data); }