mirror of
https://github.com/home-assistant/frontend.git
synced 2025-11-10 03:19:44 +00:00
Make error texts of device automation picker translatable (#7370)
This commit is contained in:
@@ -33,16 +33,24 @@ export abstract class HaDeviceAutomationPicker<
|
||||
|
||||
@property() public value?: T;
|
||||
|
||||
protected NO_AUTOMATION_TEXT = "No automations";
|
||||
|
||||
protected UNKNOWN_AUTOMATION_TEXT = "Unknown automation";
|
||||
|
||||
@internalProperty() private _automations: T[] = [];
|
||||
|
||||
// Trigger an empty render so we start with a clean DOM.
|
||||
// paper-listbox does not like changing things around.
|
||||
@internalProperty() private _renderEmpty = false;
|
||||
|
||||
protected get NO_AUTOMATION_TEXT() {
|
||||
return this.hass.localize(
|
||||
"ui.panel.config.devices.automation.actions.no_actions"
|
||||
);
|
||||
}
|
||||
|
||||
protected get UNKNOWN_AUTOMATION_TEXT() {
|
||||
return this.hass.localize(
|
||||
"ui.panel.config.devices.automation.actions.unknown_action"
|
||||
);
|
||||
}
|
||||
|
||||
private _localizeDeviceAutomation: (
|
||||
hass: HomeAssistant,
|
||||
automation: T
|
||||
|
||||
Reference in New Issue
Block a user