This commit is contained in:
Koen Kanters 2021-05-03 20:44:33 +02:00
parent 700e9c0c3a
commit a35faa9554
2 changed files with 3 additions and 3 deletions

View File

@ -322,7 +322,7 @@ function applyEnvironmentVariables(settings) {
const iterate = (obj, path) => {
Object.keys(obj).forEach((key) => {
if (key !== 'type') {
if (key !== 'properties') {
if (key !== 'properties' && obj[key]) {
const type = (obj[key].type || 'object').toString();
const envPart = path.reduce((acc, val) => `${acc}${val}_`, '');
const envVariableName = (`ZIGBEE2MQTT_CONFIG_${envPart}${key}`).toUpperCase();
@ -347,7 +347,7 @@ function applyEnvironmentVariables(settings) {
}
}
if (typeof obj[key] === 'object') {
if (typeof obj[key] === 'object' && obj[key]) {
const newPath = [...path];
if (key !== 'properties') {
newPath.push(key);

View File

@ -144,7 +144,7 @@
},
"adapter": {
"type": ["string", "null"],
"enum": ["deconz", "zstack", "zigate", "ezsp"],
"enum": ["deconz", "zstack", "zigate", "ezsp", null],
"title": "Adapter",
"requiresRestart": true,
"description": "Adapter type, not needed unless you are experiencing problems"