From c474ebb9535700d15f6a9c83f4ca0708a48c968a Mon Sep 17 00:00:00 2001 From: tedstriker Date: Sun, 11 Jun 2017 22:54:38 +0200 Subject: [PATCH] added dismiss topic for service (#2693) * added dismiss topic for service This file change will be linked to a PR which enhances the `persistent notification` with a "dismiss" service * Changed the description as requested Hope you find this version more acceptable. Maybe you can suggest a more suiting description? --- .../_components/persistent_notification.markdown | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/_components/persistent_notification.markdown b/source/_components/persistent_notification.markdown index b853432d46b..2f96756ea92 100644 --- a/source/_components/persistent_notification.markdown +++ b/source/_components/persistent_notification.markdown @@ -40,6 +40,21 @@ action: title: "Custom subject" ``` +The service `persistent_notification/dismiss` requires a `notification_id`. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | ----------- | +| `notification_id` | no | the `notification_id` is required to identify the notification that should be removed. + +This service allows you to remove a notifications by script or automation. + +```yaml +action: + service: persistent_notification.dismiss + data: + notification_id: "1234" +``` + ### {% linkable_title Create a persistent notification %} Choose service developer tool icon **Services** from the **Developer Tools** to call the `persistent_notification` service. Select `persistent_notification/create` from the list of **Available services:** and enter something like the sample below into the **Service Data** field and hit **CALL SERVICE**.