From 7d123fd25ed845ab9d6bf975ae36943b5784e241 Mon Sep 17 00:00:00 2001 From: Jason <37859597+zachowj@users.noreply.github.com> Date: Fri, 8 Sep 2023 02:05:01 -0700 Subject: [PATCH] fix(trigger-state): Only output custom ouputs with valid conditions --- src/nodes/trigger-state/TriggerStateController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nodes/trigger-state/TriggerStateController.ts b/src/nodes/trigger-state/TriggerStateController.ts index aac282727c..eaa806dd53 100644 --- a/src/nodes/trigger-state/TriggerStateController.ts +++ b/src/nodes/trigger-state/TriggerStateController.ts @@ -260,13 +260,13 @@ export default class TriggerStateController extends ExposeAsController { actualValue, }: CustomOutputsComparatorResult, eventMessage: HassStateChangedEvent - ): Record { + ): Record | null { // If comparator did not match if (!comparatorMatched) { this.debugToClient( `output comparator failed: property "${output.comparatorPropertyValue}" with value ${actualValue} failed "${output.comparatorType}" check against (${output.comparatorValueDataType}) ${output.comparatorValue}` ); - return {}; + return null; } let message: Record = {