mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-20 07:46:52 +00:00
Update configuration variable style
This commit is contained in:
parent
36a2863d10
commit
65029f3b71
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user