From 054572ce21fd034685f8ba8a78972c4f30e33221 Mon Sep 17 00:00:00 2001 From: Matthias Kleine Date: Fri, 8 Sep 2023 10:29:07 +0200 Subject: [PATCH] Added folder --- main.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.js b/main.js index 03c6a3c..761b42b 100644 --- a/main.js +++ b/main.js @@ -379,6 +379,15 @@ class Proxmox extends utils.Adapter { if (nodeDisks) { for (const disk of nodeDisks) { const diskPath = 'disk_' + String(disk.devpath).replace('/dev/', ''); + + await this.setObjectNotExistsAsync(`${sid}.${diskPath}`, { + type: 'folder', + common: { + name: disk.devpath, + }, + native: {}, + }); + if (disk.type !== undefined) { await this.createCustomState(sid, `${diskPath}.type`, 'text', disk.type); }