Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions source/_components/cover.template.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ To enable Template Covers in your installation,
add the following to your `configuration.yaml` file:

{% raw %}

```yaml
# Example configuration.yaml entry
cover:
Expand All @@ -34,6 +35,7 @@ cover:
stop_cover:
service: script.stop_garage_door
```

{% endraw %}

{% configuration %}
Expand Down Expand Up @@ -62,6 +64,11 @@ cover:
description: Defines a template to specify which icon to use.
required: false
type: template
availability_template:
description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`.
required: false
type: template
default: true
device_class:
description: Sets the [class of the device](/components/cover/), changing the device state and icon that is displayed on the frontend.
required: false
Expand Down Expand Up @@ -136,6 +143,7 @@ This example converts a garage door with a controllable switch and position
sensor into a cover.

{% raw %}

```yaml
cover:
- platform: template
Expand All @@ -162,13 +170,15 @@ cover:
mdi:garage
{% endif %}
```

{% endraw %}

### Multiple Covers

This example allows you to control two or more covers at once.

{% raw %}

```yaml
homeassistant:
customize:
Expand Down Expand Up @@ -249,13 +259,15 @@ automation:
entity_id: cover.cover_group
position: 25
```

{% endraw %}

### Change The Icon

This example shows how to change the icon based on the cover state.

{% raw %}

```yaml
cover:
- platform: template
Expand All @@ -282,13 +294,15 @@ cover:
mdi:window-closed
{% endif %}
```

{% endraw %}

### Change The Entity Picture

This example shows how to change the entity picture based on the cover state.

{% raw %}

```yaml
cover:
- platform: template
Expand All @@ -315,4 +329,5 @@ cover:
/local/cover-closed.png
{% endif %}
```

{% endraw %}