From 922597e582fdb2def670d9b1241494054324f28b Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Sat, 20 Oct 2018 18:58:13 +0200 Subject: [PATCH] fix: Avoid trying to report duplicated values in initial config We do this by formatting the keys from the target state before comparing them with the ones from the current state (that are already formatted to strip the namespace prefix). Change-type: patch Signed-off-by: Pablo Carranza Velez --- src/api-binder.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api-binder.coffee b/src/api-binder.coffee index ef1e2444..45dc1479 100644 --- a/src/api-binder.coffee +++ b/src/api-binder.coffee @@ -316,7 +316,8 @@ module.exports = class APIBinder _reportInitialEnv: (apiEndpoint) => Promise.join( @deviceState.getCurrentForComparison() - @getTargetState() + @getTargetState().then (conf) => + @deviceState.deviceConfig.formatConfigKeys(conf) @deviceState.deviceConfig.getDefaults() @config.get('deviceId') (currentState, targetState, defaultConfig, deviceId) =>