mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 02:07:15 +00:00
Update Timer configuration (#7017)
This commit is contained in:
parent
09b273161f
commit
8a27a51f24
@ -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.
|
With the current implementation timers don't persist over restarts. After a restart they will be idle again, together with their initial configuration.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
## {% linkable_title Configuration %}
|
||||||
|
|
||||||
To add a timer to your installation, add the following to your `configuration.yaml` file:
|
To add a timer to your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@ -30,12 +32,26 @@ timer:
|
|||||||
duration: '00:01:00'
|
duration: '00:01:00'
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
"[alias]":
|
||||||
- **[alias]** (*Required*): Alias for the timer. Multiple entries are allowed.
|
description: Alias for the timer. Multiple entries are allowed.
|
||||||
- **name** (*Optional*): Friendly name of the timer.
|
required: true
|
||||||
- **duration** (*Optional*): Initial duration in seconds or `00:00:00` when Home Assistant starts. Defaults to 0.
|
type: map
|
||||||
- **icon** (*Optional*): Set a custom icon for the state card.
|
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`.
|
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`. |
|
| `entity_id` | yes | Name of the entity to take action, e.g., `timer.timer0`. |
|
||||||
|
|
||||||
|
|
||||||
### {% linkable_title Use the service %}
|
### {% linkable_title Use the service %}
|
||||||
|
|
||||||
Select <img src='/images/screenshots/developer-tool-services-icon.png' alt='service developer tool icon' class="no-shadow" height="38" /> **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**.
|
Select <img src='/images/screenshots/developer-tool-services-icon.png' alt='service developer tool icon' class="no-shadow" height="38" /> **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**.
|
||||||
@ -160,4 +175,3 @@ script:
|
|||||||
- service: timer.finish
|
- service: timer.finish
|
||||||
entity_id: timer.test
|
entity_id: timer.test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user