mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-17 02:48:31 -07:00
Allow null values for serial.adapter. https://github.com/nurikk/z2m-frontend/issues/449
This commit is contained in:
parent
700e9c0c3a
commit
a35faa9554
@ -322,7 +322,7 @@ function applyEnvironmentVariables(settings) {
|
|||||||
const iterate = (obj, path) => {
|
const iterate = (obj, path) => {
|
||||||
Object.keys(obj).forEach((key) => {
|
Object.keys(obj).forEach((key) => {
|
||||||
if (key !== 'type') {
|
if (key !== 'type') {
|
||||||
if (key !== 'properties') {
|
if (key !== 'properties' && obj[key]) {
|
||||||
const type = (obj[key].type || 'object').toString();
|
const type = (obj[key].type || 'object').toString();
|
||||||
const envPart = path.reduce((acc, val) => `${acc}${val}_`, '');
|
const envPart = path.reduce((acc, val) => `${acc}${val}_`, '');
|
||||||
const envVariableName = (`ZIGBEE2MQTT_CONFIG_${envPart}${key}`).toUpperCase();
|
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];
|
const newPath = [...path];
|
||||||
if (key !== 'properties') {
|
if (key !== 'properties') {
|
||||||
newPath.push(key);
|
newPath.push(key);
|
||||||
|
@ -144,7 +144,7 @@
|
|||||||
},
|
},
|
||||||
"adapter": {
|
"adapter": {
|
||||||
"type": ["string", "null"],
|
"type": ["string", "null"],
|
||||||
"enum": ["deconz", "zstack", "zigate", "ezsp"],
|
"enum": ["deconz", "zstack", "zigate", "ezsp", null],
|
||||||
"title": "Adapter",
|
"title": "Adapter",
|
||||||
"requiresRestart": true,
|
"requiresRestart": true,
|
||||||
"description": "Adapter type, not needed unless you are experiencing problems"
|
"description": "Adapter type, not needed unless you are experiencing problems"
|
||||||
|
Loading…
Reference in New Issue
Block a user