Add hint helpers to fields that support markdown (#25528)

* Add hint helpers to fields that support markdown

* reduce duplication
This commit is contained in:
karwosts
2025-05-20 22:13:28 -07:00
committed by GitHub
parent 07e5f53469
commit f0beef22d2
4 changed files with 21 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ import type {
EntityRegistryUpdate,
SaveDialogParams,
} from "./show-dialog-automation-save";
import { supportsMarkdownHelper } from "../../../../common/translations/markdown_support";
@customElement("ha-dialog-automation-save")
class DialogAutomationSave extends LitElement implements HassDialog {
@@ -156,6 +157,7 @@ class DialogAutomationSave extends LitElement implements HassDialog {
name="description"
autogrow
.value=${this._newDescription}
.helper=${supportsMarkdownHelper(this.hass.localize)}
@input=${this._valueChanged}
></ha-textarea>`
: nothing}