mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 03:06:41 +00:00
Add helper text to inputs of time pattern trigger (#23844)
This commit is contained in:
parent
06a08bb4f2
commit
2effb0935c
@ -33,6 +33,7 @@ export class HaTimePatternTrigger extends LitElement implements TriggerElement {
|
|||||||
.data=${this.trigger}
|
.data=${this.trigger}
|
||||||
.disabled=${this.disabled}
|
.disabled=${this.disabled}
|
||||||
.computeLabel=${this._computeLabelCallback}
|
.computeLabel=${this._computeLabelCallback}
|
||||||
|
.computeHelper=${this._computeHelperCallback}
|
||||||
@value-changed=${this._valueChanged}
|
@value-changed=${this._valueChanged}
|
||||||
></ha-form>
|
></ha-form>
|
||||||
`;
|
`;
|
||||||
@ -50,6 +51,13 @@ export class HaTimePatternTrigger extends LitElement implements TriggerElement {
|
|||||||
this.hass.localize(
|
this.hass.localize(
|
||||||
`ui.panel.config.automation.editor.triggers.type.time_pattern.${schema.name}`
|
`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 {
|
declare global {
|
||||||
|
@ -3718,6 +3718,7 @@
|
|||||||
},
|
},
|
||||||
"time_pattern": {
|
"time_pattern": {
|
||||||
"label": "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",
|
"hours": "Hours",
|
||||||
"minutes": "Minutes",
|
"minutes": "Minutes",
|
||||||
"seconds": "Seconds",
|
"seconds": "Seconds",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user