Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons docs #11885

Merged
merged 1 commit into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
110 changes: 33 additions & 77 deletions source/lovelace/header-footer.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ description: "Decorate your Lovelace cards with header and footer widgets."

Some Lovelace cards have support for header and footer widgets. These widgets fill up the whole available space in a card.

<p class='img'><img src='/images/lovelace/header-footer/screenshot-picture-buttons.png' alt="Screenshot of an entities card with a picture header.">
Screenshot of an entities card with a picture header and buttons footer.
</p>

## Picture header & footer

Widget to show a picture as a header or a footer. A picture can have touch actions associated with it.

<p class='img'><img src='/images/lovelace/header-footer/screenshot-picture-header.png' alt="Screenshot of an entities card with a picture header.">
Screenshot of an entities card with a picture header.
</p>

```yaml
type: picture
image: 'https://www.home-assistant.io/images/lovelace/header-footer/balloons-header.png'
Expand All @@ -29,92 +29,48 @@ image:
type: string
tap_action:
required: false
description: Action to take on tap
description: Action to take on tap.
type: map
keys:
action:
required: true
description: "Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `url`, `none`)"
type: string
default: "`toggle`"
navigation_path:
required: false
description: "Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`"
type: string
default: none
url_path:
required: false
description: "Path to navigate to (e.g. `https://www.home-assistant.io`) when `action` defined as `url`"
type: string
default: none
service:
required: false
description: "Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`"
type: string
default: none
service_data:
required: false
description: "Service data to include (e.g. `entity_id: media_player.bedroom`) when `action` defined as `call-service`"
type: string
default: none
hold_action:
required: false
description: Action to take on tap-and-hold
type: map
keys:
action:
required: true
description: "Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `url`, `none`)"
type: string
default: "`more-info`"
navigation_path:
required: false
description: "Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`"
type: string
default: none
url_path:
required: false
description: "Path to navigate to (e.g. `https://www.home-assistant.io`) when `action` defined as `url`"
type: string
default: none
service:
required: false
description: "Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`"
type: string
default: none
service_data:
required: false
description: "Service data to include (e.g. `entity_id: media_player.bedroom`) when `action` defined as `call-service`"
type: string
default: none
double_tap_action:
required: false
description: Action to take on double tap
description: Action to take on tap-and-hold
type: map
{% endconfiguration %}

## Buttons header & footer

Widget to show entities as buttons in the header or footer.

```yaml
type: buttons
entities:
- script.launch_confetti
- entity: script.swirl_lights
icon: 'mdi:track-light'
- entity: script.run_siren
icon: 'mdi:alarm-light'
```

{% configuration header-footer %}
entities:
required: true
description: A list of entities to show. Each entry is either an entity ID or a map.
type: list
keys:
action:
entity:
required: true
description: "Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `url`, `none`)"
type: string
default: "`more-info`"
navigation_path:
required: false
description: "Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`"
type: string
default: none
url_path:
required: false
description: "Path to navigate to (e.g. `https://www.home-assistant.io`) when `action` defined as `url`"
description: The entity to render.
type: string
default: none
service:
icon:
required: false
description: "Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`"
description: Override the entity icon.
type: string
default: none
service_data:
image:
required: false
description: "Service data to include (e.g. `entity_id: media_player.bedroom`) when `action` defined as `call-service`"
description: Override the entity image.
type: string
default: none
{% endconfiguration %}