From 65029f3b712a8d9fb234b4c18a1da93284f7e54d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Nov 2017 08:45:47 +0100 Subject: [PATCH] Update configuration variable style --- source/_components/notify.lametric.markdown | 47 ++++++++++++++------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/source/_components/notify.lametric.markdown b/source/_components/notify.lametric.markdown index 457af05cbc7..d891b196b86 100644 --- a/source/_components/notify.lametric.markdown +++ b/source/_components/notify.lametric.markdown @@ -12,38 +12,55 @@ ha_category: Notifications ha_release: 0.49 --- -This component allows to send notification to a LaMetric device. It needs the LaMetric platform to be configured first. +The `lametric` notification platform allows to send notification to a LaMetric device. It needs the LaMetric platform to be configured first. + +To enable LaMetric notifications in your installation, add the following to your `configuration.yaml` file: ```yaml notify: - name: lametric1 + name: NOTIFIER_NAME platform: lametric ``` -- **name** (*Optional*): The name of the LaMetric device. Usually it is "My Lametric". -- **lifetime** (*Optional*): Defines how long the message remains in LaMetric notification queue (in seconds). Defaults to 10. -- **icon** (*Optional*): An icon or animation. Check out the list of all icons here: https://developer.lametric.com/icons -Note that icons always begin with "i" while animations begin with "a". This is part of the name, you can't just use the number! -- **cycles** (*Optional*): Defines how often the notification is displayed. Defaults to 1. +{% configuration %} +name: + description: "The optional parameter `name` allows multiple notifiers to be created. The notifier will bind to the service `notify.NOTIFIER_NAME`." + required: false + type: string + default: notify +lifetime: + description: Defines how long the message remains in LaMetric notification queue (in seconds). + required: false + type: int + default: 10 +icon: + description: An icon or animation. + required: false + type: string +cycles: + description: Defines how often the notification is displayed. + required: false + type: int + default: 1 +{% endconfiguration %} -Extended functionality: +Check out the list of all icons at [https://developer.lametric.com/icons](https://developer.lametric.com/icons). Note that icons always begin with "i" while animations begin with "a". This is part of the name, you can't just use the number! + +## {% linkable_title Example %} To add a notification sound or an icon override, it has to be done via service data. -Example: - -``` -... -- alias: 'Send notification on arrival at school' +```yaml +- alias: "Send notification on arrival at school" trigger: platform: state entity_id: device_tracker.son_mobile from: 'not_home' to: 'school' action: - service: notify.lametric1 + service: notify.lametric data: - message: 'Son has arrived at school!' + message: "Son has arrived at school!" data: sound: 'notification' icon: 'i51'