From 8a27a51f244d33c16ab49325f4cff931d67435d6 Mon Sep 17 00:00:00 2001
From: Jorim Tielemans
Date: Tue, 23 Oct 2018 10:41:06 +0200
Subject: [PATCH] Update Timer configuration (#7017)
---
source/_components/timer.markdown | 40 +++++++++++++++++++++----------
1 file changed, 27 insertions(+), 13 deletions(-)
diff --git a/source/_components/timer.markdown b/source/_components/timer.markdown
index dad6227958e..946e20cd8d9 100644
--- a/source/_components/timer.markdown
+++ b/source/_components/timer.markdown
@@ -21,6 +21,8 @@ When a timer finishes or gets canceled the corresponding events are fired. This
With the current implementation timers don't persist over restarts. After a restart they will be idle again, together with their initial configuration.
+## {% linkable_title Configuration %}
+
To add a timer to your installation, add the following to your `configuration.yaml` file:
```yaml
@@ -30,12 +32,26 @@ timer:
duration: '00:01:00'
```
-Configuration variables:
-
-- **[alias]** (*Required*): Alias for the timer. Multiple entries are allowed.
- - **name** (*Optional*): Friendly name of the timer.
- - **duration** (*Optional*): Initial duration in seconds or `00:00:00` when Home Assistant starts. Defaults to 0.
- - **icon** (*Optional*): Set a custom icon for the state card.
+{% configuration %}
+"[alias]":
+ description: Alias for the timer. Multiple entries are allowed.
+ required: true
+ type: map
+ keys:
+ name:
+ description: Friendly name of the timer.
+ required: false
+ type: string
+ duration:
+ description: Initial duration in seconds or `00:00:00` when Home Assistant starts.
+ required: false
+ type: [integer, time]
+ default: 0
+ icon:
+ description: Set a custom icon for the state card.
+ required: false
+ type: icon
+{% endconfiguration %}
Pick an icon that you can find on [materialdesignicons.com](https://materialdesignicons.com/) to use for your timer and prefix the name with `mdi:`. For example `mdi:car`, `mdi:ambulance`, or `mdi:motorbike`.
@@ -82,7 +98,6 @@ Manually finish a running timer earlier than scheduled. If no `entity_id` is giv
| ---------------------- | -------- | ----------- |
| `entity_id` | yes | Name of the entity to take action, e.g., `timer.timer0`. |
-
### {% linkable_title Use the service %}
Select
**Services** from the **Developer Tools**. Choose **timer** from the list of **Domains**, select the **Service**, enter something like the sample below into the **Service Data** field, and hit **CALL SERVICE**.
@@ -95,7 +110,7 @@ Select 