Add helper text to inputs of time pattern trigger (#23844)

This commit is contained in:
Jan-Philipp Benecke 2025-01-23 08:40:13 +01:00 committed by GitHub
parent 06a08bb4f2
commit 2effb0935c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -33,6 +33,7 @@ export class HaTimePatternTrigger extends LitElement implements TriggerElement {
.data=${this.trigger}
.disabled=${this.disabled}
.computeLabel=${this._computeLabelCallback}
.computeHelper=${this._computeHelperCallback}
@value-changed=${this._valueChanged}
></ha-form>
`;
@ -50,6 +51,13 @@ export class HaTimePatternTrigger extends LitElement implements TriggerElement {
this.hass.localize(
`ui.panel.config.automation.editor.triggers.type.time_pattern.${schema.name}`
);
private _computeHelperCallback = (
_schema: SchemaUnion<typeof SCHEMA>
): string =>
this.hass.localize(
`ui.panel.config.automation.editor.triggers.type.time_pattern.help`
);
}
declare global {

View File

@ -3718,6 +3718,7 @@
},
"time_pattern": {
"label": "Time pattern",
"help": "Prefix the value with \"/\" to match whenever the value is divisible by that number. Use \"*\" to match any value.",
"hours": "Hours",
"minutes": "Minutes",
"seconds": "Seconds",