mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-09 10:26:52 +00:00
Buttons docs (#11885)
This commit is contained in:
parent
74a4fdb4ba
commit
70f61c8608
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
Before Width: | Height: | Size: 20 KiB |
@ -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.
|
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
|
## Picture header & footer
|
||||||
|
|
||||||
Widget to show a picture as a header or a footer. A picture can have touch actions associated with it.
|
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
|
```yaml
|
||||||
type: picture
|
type: picture
|
||||||
image: 'https://www.home-assistant.io/images/lovelace/header-footer/balloons-header.png'
|
image: 'https://www.home-assistant.io/images/lovelace/header-footer/balloons-header.png'
|
||||||
@ -29,92 +29,48 @@ image:
|
|||||||
type: string
|
type: string
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action to take on tap
|
description: Action to take on tap.
|
||||||
type: map
|
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:
|
hold_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action to take on tap-and-hold
|
description: Action to take on tap-and-hold
|
||||||
type: map
|
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:
|
double_tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: Action to take on double tap
|
description: Action to take on tap-and-hold
|
||||||
type: map
|
type: map
|
||||||
keys:
|
{% endconfiguration %}
|
||||||
action:
|
|
||||||
required: true
|
## Buttons header & footer
|
||||||
description: "Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `url`, `none`)"
|
|
||||||
type: string
|
Widget to show entities as buttons in the header or footer.
|
||||||
default: "`more-info`"
|
|
||||||
navigation_path:
|
```yaml
|
||||||
required: false
|
type: buttons
|
||||||
description: "Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`"
|
entities:
|
||||||
type: string
|
- script.launch_confetti
|
||||||
default: none
|
- entity: script.swirl_lights
|
||||||
url_path:
|
icon: 'mdi:track-light'
|
||||||
required: false
|
- entity: script.run_siren
|
||||||
description: "Path to navigate to (e.g. `https://www.home-assistant.io`) when `action` defined as `url`"
|
icon: 'mdi:alarm-light'
|
||||||
type: string
|
```
|
||||||
default: none
|
|
||||||
service:
|
{% configuration header-footer %}
|
||||||
required: false
|
entities:
|
||||||
description: "Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`"
|
required: true
|
||||||
type: string
|
description: A list of entities to show. Each entry is either an entity ID or a map.
|
||||||
default: none
|
type: list
|
||||||
service_data:
|
keys:
|
||||||
required: false
|
entity:
|
||||||
description: "Service data to include (e.g. `entity_id: media_player.bedroom`) when `action` defined as `call-service`"
|
required: true
|
||||||
type: string
|
description: The entity to render.
|
||||||
default: none
|
type: string
|
||||||
|
icon:
|
||||||
|
required: false
|
||||||
|
description: Override the entity icon.
|
||||||
|
type: string
|
||||||
|
image:
|
||||||
|
required: false
|
||||||
|
description: Override the entity image.
|
||||||
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user