Use template selector in numeric state templates (#13428)

This commit is contained in:
Franck Nijhof 2022-08-22 18:04:36 +02:00 committed by GitHub
parent bbc5b02a22
commit 82f48d106f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -99,7 +99,7 @@ export default class HaNumericStateCondition extends LitElement {
{ name: "below", selector: { text: {} } }, { name: "below", selector: { text: {} } },
{ {
name: "value_template", name: "value_template",
selector: { text: { multiline: true } }, selector: { template: {} },
}, },
] as const ] as const
); );

View File

@ -95,7 +95,7 @@ export class HaNumericStateTrigger extends LitElement {
{ name: "below", selector: { text: {} } }, { name: "below", selector: { text: {} } },
{ {
name: "value_template", name: "value_template",
selector: { text: { multiline: true } }, selector: { template: {} },
}, },
{ name: "for", selector: { duration: {} } }, { name: "for", selector: { duration: {} } },
] as const ] as const
@ -106,7 +106,7 @@ export class HaNumericStateTrigger extends LitElement {
return; return;
} }
// Check for templates in trigger. If found, revert to YAML mode. // 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( fireEvent(
this, this,
"ui-mode-not-available", "ui-mode-not-available",