mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Migrate persistent notification services to support translations (#96391)
* Migrate persistent notification services to support translations * Apply suggestions from code review Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
2d474813c0
commit
7ca539fcd0
@ -1,39 +1,25 @@
|
|||||||
create:
|
create:
|
||||||
name: Create
|
|
||||||
description: Show a notification in the frontend.
|
|
||||||
fields:
|
fields:
|
||||||
message:
|
message:
|
||||||
name: Message
|
|
||||||
description: Message body of the notification.
|
|
||||||
required: true
|
required: true
|
||||||
example: Please check your configuration.yaml.
|
example: Please check your configuration.yaml.
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
title:
|
title:
|
||||||
name: Title
|
|
||||||
description: Optional title for your notification.
|
|
||||||
example: Test notification
|
example: Test notification
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
notification_id:
|
notification_id:
|
||||||
name: Notification ID
|
|
||||||
description: Target ID of the notification, will replace a notification with the same ID.
|
|
||||||
example: 1234
|
example: 1234
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
dismiss:
|
dismiss:
|
||||||
name: Dismiss
|
|
||||||
description: Remove a notification from the frontend.
|
|
||||||
fields:
|
fields:
|
||||||
notification_id:
|
notification_id:
|
||||||
name: Notification ID
|
|
||||||
description: Target ID of the notification, which should be removed.
|
|
||||||
required: true
|
required: true
|
||||||
example: 1234
|
example: 1234
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
dismiss_all:
|
dismiss_all:
|
||||||
name: Dismiss All
|
|
||||||
description: Remove all notifications.
|
|
||||||
|
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"services": {
|
||||||
|
"create": {
|
||||||
|
"name": "Create",
|
||||||
|
"description": "Shows a notification on the **Notifications** panel.",
|
||||||
|
"fields": {
|
||||||
|
"message": {
|
||||||
|
"name": "Message",
|
||||||
|
"description": "Message body of the notification."
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "Title",
|
||||||
|
"description": "Optional title of the notification."
|
||||||
|
},
|
||||||
|
"notification_id": {
|
||||||
|
"name": "Notification ID",
|
||||||
|
"description": "ID of the notification. This new notification will overwrite an existing notification with the same ID."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dismiss": {
|
||||||
|
"name": "Dismiss",
|
||||||
|
"description": "Removes a notification from the **Notifications** panel.",
|
||||||
|
"fields": {
|
||||||
|
"notification_id": {
|
||||||
|
"name": "Notification ID",
|
||||||
|
"description": "ID of the notification to be removed."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dismiss_all": {
|
||||||
|
"name": "Dismiss all",
|
||||||
|
"description": "Removes all notifications from the **Notifications** panel."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user