From f0925ea83bb75b145130c8857feeec27508dae82 Mon Sep 17 00:00:00 2001 From: Ingo Fischer Date: Fri, 3 Sep 2021 09:59:11 +0200 Subject: [PATCH] * add another type conversion --- main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.js b/main.js index 88eb346..23f3aab 100644 --- a/main.js +++ b/main.js @@ -354,7 +354,7 @@ function main() { continue; } let val = entity.attributes[attr]; - if (typeof val === 'object' && val !== null) { + if ((typeof val === 'object' && val !== null) || Array.isArray(val)) { val = JSON.stringify(entity.attributes[attr]); } adapter.setForeignState(id + attr, {val, ack: true, lc, ts});