diff --git a/buildHADefs.js b/buildHADefs.js index fc50161..67bef6f 100644 --- a/buildHADefs.js +++ b/buildHADefs.js @@ -22,9 +22,6 @@ export function buildHADefs(self) { if (self.HA_CONFIG[s][mc].has) { let haName = self.HA_CONFIG[s][mc].name + 'Gain' - - - haVariables.push({ name: haName + ' %', variableId: vID + '_p', diff --git a/index.js b/index.js index 4bb1e96..d849f34 100644 --- a/index.js +++ b/index.js @@ -43,6 +43,11 @@ class BAirInstance extends InstanceBase { async init(config) { this.config = config + + if (!this.config.channels) { + this.config.channels = parseInt(this.config.model.replace(/\D/g, '')) + this.saveConfig(this.config) + } this.snapshot = [] this.currentSnapshot = 0 diff --git a/package.json b/package.json index 141cab5..74fd034 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "behringer-xair", - "version": "2.4.1", + "version": "2.4.2", "type": "module", "main": "index.js", "scripts": {