From 82f48d106f61e6c4b96b071670a071677a05ef32 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 22 Aug 2022 18:04:36 +0200 Subject: [PATCH] Use template selector in numeric state templates (#13428) --- .../condition/types/ha-automation-condition-numeric_state.ts | 2 +- .../trigger/types/ha-automation-trigger-numeric_state.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts b/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts index b45dd1da83..5b76d3008a 100644 --- a/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts +++ b/src/panels/config/automation/condition/types/ha-automation-condition-numeric_state.ts @@ -99,7 +99,7 @@ export default class HaNumericStateCondition extends LitElement { { name: "below", selector: { text: {} } }, { name: "value_template", - selector: { text: { multiline: true } }, + selector: { template: {} }, }, ] as const ); diff --git a/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts b/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts index 5a3c95fad3..e49cfbcd39 100644 --- a/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts +++ b/src/panels/config/automation/trigger/types/ha-automation-trigger-numeric_state.ts @@ -95,7 +95,7 @@ export class HaNumericStateTrigger extends LitElement { { name: "below", selector: { text: {} } }, { name: "value_template", - selector: { text: { multiline: true } }, + selector: { template: {} }, }, { name: "for", selector: { duration: {} } }, ] as const @@ -106,7 +106,7 @@ export class HaNumericStateTrigger extends LitElement { return; } // Check for templates in trigger. If found, revert to YAML mode. - if (this.trigger && hasTemplate(this.trigger)) { + if (this.trigger && hasTemplate(this.trigger.for)) { fireEvent( this, "ui-mode-not-available",