Migrate notify services to support translations (#96413)
* Migrate notify 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
273e80cc45
commit
a96ee22afa
2 changed files with 45 additions and 25 deletions
|
@ -1,61 +1,37 @@
|
||||||
# Describes the format for available notification services
|
# Describes the format for available notification services
|
||||||
|
|
||||||
notify:
|
notify:
|
||||||
name: Send a notification
|
|
||||||
description: Sends a notification message to selected notify platforms.
|
|
||||||
fields:
|
fields:
|
||||||
message:
|
message:
|
||||||
name: Message
|
|
||||||
description: Message body of the notification.
|
|
||||||
required: true
|
required: true
|
||||||
example: The garage door has been open for 10 minutes.
|
example: The garage door has been open for 10 minutes.
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
title:
|
title:
|
||||||
name: Title
|
|
||||||
description: Title for your notification.
|
|
||||||
example: "Your Garage Door Friend"
|
example: "Your Garage Door Friend"
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
target:
|
target:
|
||||||
name: Target
|
|
||||||
description:
|
|
||||||
An array of targets to send the notification to. Optional depending on
|
|
||||||
the platform.
|
|
||||||
example: platform specific
|
example: platform specific
|
||||||
selector:
|
selector:
|
||||||
object:
|
object:
|
||||||
data:
|
data:
|
||||||
name: Data
|
|
||||||
description:
|
|
||||||
Extended information for notification. Optional depending on the
|
|
||||||
platform.
|
|
||||||
example: platform specific
|
example: platform specific
|
||||||
selector:
|
selector:
|
||||||
object:
|
object:
|
||||||
|
|
||||||
persistent_notification:
|
persistent_notification:
|
||||||
name: Send a persistent notification
|
|
||||||
description: Sends a notification that is visible in the front-end.
|
|
||||||
fields:
|
fields:
|
||||||
message:
|
message:
|
||||||
name: Message
|
|
||||||
description: Message body of the notification.
|
|
||||||
required: true
|
required: true
|
||||||
example: The garage door has been open for 10 minutes.
|
example: The garage door has been open for 10 minutes.
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
title:
|
title:
|
||||||
name: Title
|
|
||||||
description: Title for your notification.
|
|
||||||
example: "Your Garage Door Friend"
|
example: "Your Garage Door Friend"
|
||||||
selector:
|
selector:
|
||||||
text:
|
text:
|
||||||
data:
|
data:
|
||||||
name: Data
|
|
||||||
description:
|
|
||||||
Extended information for notification. Optional depending on the
|
|
||||||
platform.
|
|
||||||
example: platform specific
|
example: platform specific
|
||||||
selector:
|
selector:
|
||||||
object:
|
object:
|
||||||
|
|
|
@ -1 +1,45 @@
|
||||||
{ "title": "Notifications" }
|
{
|
||||||
|
"title": "Notifications",
|
||||||
|
"services": {
|
||||||
|
"notify": {
|
||||||
|
"name": "Send a notification",
|
||||||
|
"description": "Sends a notification message to selected targets.",
|
||||||
|
"fields": {
|
||||||
|
"message": {
|
||||||
|
"name": "Message",
|
||||||
|
"description": "Message body of the notification."
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "Title",
|
||||||
|
"description": "Title for your notification."
|
||||||
|
},
|
||||||
|
"target": {
|
||||||
|
"name": "Target",
|
||||||
|
"description": "Some integrations allow you to specify the targets that receive the notification. For more information, refer to the integration documentation."
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"name": "Data",
|
||||||
|
"description": "Some integrations provide extended functionality. For information on how to use _data_, refer to the integration documentation."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"persistent_notification": {
|
||||||
|
"name": "Send a persistent notification",
|
||||||
|
"description": "Sends a notification that is visible in the **Notifications** panel.",
|
||||||
|
"fields": {
|
||||||
|
"message": {
|
||||||
|
"name": "Message",
|
||||||
|
"description": "Message body of the notification."
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"name": "Title",
|
||||||
|
"description": "Title of the notification."
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"name": "Data",
|
||||||
|
"description": "Some integrations provide extended functionality. For information on how to use _data_, refer to the integration documentation.."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue