Skip to content

Commit

Permalink
fix(trigger-state): Only output custom ouputs with valid conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
zachowj committed Sep 24, 2023
1 parent 4cbbb46 commit 7d123fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nodes/trigger-state/TriggerStateController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,13 @@ export default class TriggerStateController extends ExposeAsController {
actualValue,
}: CustomOutputsComparatorResult,
eventMessage: HassStateChangedEvent
): Record<string, unknown> {
): Record<string, unknown> | 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<string, unknown> = {
Expand Down

0 comments on commit 7d123fd

Please sign in to comment.