From 6c4539ab09e7d8f37ed56fa29da43e9a151190e7 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 7 Jun 2022 20:50:05 +0200 Subject: [PATCH 1/2] :bug: Fix state stack merge on Google Assistant #1211 --- .../platform-googleassistant/src/GoogleAssistantPlatform.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platforms/platform-googleassistant/src/GoogleAssistantPlatform.ts b/platforms/platform-googleassistant/src/GoogleAssistantPlatform.ts index 06d881b67c..3f0fdba1b3 100644 --- a/platforms/platform-googleassistant/src/GoogleAssistantPlatform.ts +++ b/platforms/platform-googleassistant/src/GoogleAssistantPlatform.ts @@ -76,6 +76,9 @@ export class GoogleAssistantPlatform extends Platform< if (typeof objValue === 'string' && typeof srcValue === 'string') { return objValue ? objValue : srcValue; } + if (Array.isArray(objValue) && Array.isArray(srcValue)) { + return srcValue; + } }, ); From 7b70611be17288ad48a53b48df8956b1f84a3f8b Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 8 Jun 2022 10:25:59 +0200 Subject: [PATCH 2/2] :bulb: Add comment for more clarity --- .../platform-googleassistant/src/GoogleAssistantPlatform.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/platforms/platform-googleassistant/src/GoogleAssistantPlatform.ts b/platforms/platform-googleassistant/src/GoogleAssistantPlatform.ts index 3f0fdba1b3..966316c76d 100644 --- a/platforms/platform-googleassistant/src/GoogleAssistantPlatform.ts +++ b/platforms/platform-googleassistant/src/GoogleAssistantPlatform.ts @@ -76,6 +76,7 @@ export class GoogleAssistantPlatform extends Platform< if (typeof objValue === 'string' && typeof srcValue === 'string') { return objValue ? objValue : srcValue; } + // Replaces full array with the value furthest to the right. No concatenation of array values. if (Array.isArray(objValue) && Array.isArray(srcValue)) { return srcValue; }