Localize a device action string (#19203)

This commit is contained in:
karwosts 2024-01-02 05:07:34 -08:00 committed by Bram Kragten
parent aa94ec7949
commit 2add88ccc2
2 changed files with 5 additions and 2 deletions

View File

@ -404,7 +404,9 @@ const tryDescribeAction = <T extends ActionType>(
if (actionType === "device_action") { if (actionType === "device_action") {
const config = action as DeviceAction; const config = action as DeviceAction;
if (!config.device_id) { if (!config.device_id) {
return "Device action"; return hass.localize(
`${actionTranslationBaseKey}.device_id.description.no_device`
);
} }
const localized = localizeDeviceAutomationAction( const localized = localizeDeviceAutomationAction(
hass, hass,

View File

@ -2990,7 +2990,8 @@
"flash": "Flash" "flash": "Flash"
}, },
"description": { "description": {
"picker": "Do something on a device. Great way to start." "picker": "Do something on a device. Great way to start.",
"no_device": "Device action"
} }
}, },
"activate_scene": { "activate_scene": {