homey-lib
Advanced tools
Comparing version 2.21.4 to 2.21.5
@@ -264,2 +264,3 @@ /* eslint-disable no-restricted-properties */ | ||
const seenZwaveSettings = new Set(); | ||
// validate 'app.Json.drivers[].settings[].zwave' | ||
@@ -276,7 +277,17 @@ if (driver.zwave && Array.isArray(driver.settings)) { | ||
const childSetting = setting.children[k]; | ||
if (childSetting) { | ||
if (childSetting && childSetting.zwave) { | ||
if (seenZwaveSettings.has(childSetting.zwave.index)) { | ||
throw new Error(`drivers.${driver.id} invalid settings: duplicate zwave setting index ${childSetting.zwave.index}`); | ||
} else { | ||
seenZwaveSettings.add(childSetting.zwave.index); | ||
} | ||
this._checkZwaveForSetting(driver, childSetting); | ||
} | ||
} | ||
} else { | ||
} else if (setting.zwave) { | ||
if (seenZwaveSettings.has(setting.zwave.index)) { | ||
throw new Error(`drivers.${driver.id} invalid settings: duplicate zwave setting index ${setting.zwave.index}`); | ||
} else { | ||
seenZwaveSettings.add(setting.zwave.index); | ||
} | ||
this._checkZwaveForSetting(driver, setting); | ||
@@ -283,0 +294,0 @@ } |
{ | ||
"name": "homey-lib", | ||
"version": "2.21.4", | ||
"version": "2.21.5", | ||
"description": "Shared Library for Homey", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is too big to display
860027
11845