mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-26 18:57:17 +00:00
Document buttons
action support for entities
card (#16214)
This commit is contained in:
parent
e9166f6c97
commit
b051a83a4f
@ -11,7 +11,7 @@ To add the Entities card to your user interface, click the Lovelace menu (three
|
|||||||
{% configuration %}
|
{% configuration %}
|
||||||
type:
|
type:
|
||||||
required: true
|
required: true
|
||||||
description: entities
|
description: "`entities`"
|
||||||
type: string
|
type: string
|
||||||
entities:
|
entities:
|
||||||
required: true
|
required: true
|
||||||
@ -19,11 +19,11 @@ entities:
|
|||||||
type: list
|
type: list
|
||||||
title:
|
title:
|
||||||
required: false
|
required: false
|
||||||
description: The card title.
|
description: Card title.
|
||||||
type: string
|
type: string
|
||||||
icon:
|
icon:
|
||||||
required: false
|
required: false
|
||||||
description: An icon to display to the left of the title
|
description: An icon to display to the left of the title.
|
||||||
type: string
|
type: string
|
||||||
show_header_toggle:
|
show_header_toggle:
|
||||||
required: false
|
required: false
|
||||||
@ -32,11 +32,11 @@ show_header_toggle:
|
|||||||
default: true
|
default: true
|
||||||
theme:
|
theme:
|
||||||
required: false
|
required: false
|
||||||
description: Set to any theme within `themes.yaml`.
|
description: Override the used theme for this card with any loaded theme. For more information about themes, see the [frontend documentation](/integrations/frontend/).
|
||||||
type: string
|
type: string
|
||||||
state_color:
|
state_color:
|
||||||
required: false
|
required: false
|
||||||
description: Set to `true` to have icons colored when entity is active
|
description: Set to `true` to have icons colored when entity is active.
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
header:
|
header:
|
||||||
@ -51,7 +51,7 @@ footer:
|
|||||||
|
|
||||||
## Options For Entities
|
## Options For Entities
|
||||||
|
|
||||||
If you define entities as objects instead of strings (by adding `entity:` before entity ID), you can add more customization and configuration:
|
If you define entities as objects instead of strings (by adding `entity:` before entity ID), you can add more customization and configuration.
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
entity:
|
entity:
|
||||||
@ -82,21 +82,13 @@ format:
|
|||||||
required: false
|
required: false
|
||||||
description: "How the state should be formatted. Currently only used for timestamp sensors. Valid values are: `relative`, `total`, `date`, `time` and `datetime`."
|
description: "How the state should be formatted. Currently only used for timestamp sensors. Valid values are: `relative`, `total`, `date`, `time` and `datetime`."
|
||||||
type: string
|
type: string
|
||||||
header:
|
|
||||||
required: false
|
|
||||||
description: Header widget to render. See [header documentation](/lovelace/header-footer/).
|
|
||||||
type: map
|
|
||||||
footer:
|
|
||||||
required: false
|
|
||||||
description: Footer widget to render. See [footer documentation](/lovelace/header-footer/).
|
|
||||||
type: map
|
|
||||||
action_name:
|
action_name:
|
||||||
required: false
|
required: false
|
||||||
description: Button label. (Only applies to `script` and `scene` rows)
|
description: Button label (only applies to `script` and `scene` rows).
|
||||||
type: string
|
type: string
|
||||||
state_color:
|
state_color:
|
||||||
required: false
|
required: false
|
||||||
description: Set to `true` to have icons colored when entity is active
|
description: Set to `true` to have icons colored when entity is active.
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
tap_action:
|
tap_action:
|
||||||
@ -117,8 +109,39 @@ double_tap_action:
|
|||||||
|
|
||||||
Rather than only displaying an entity's state as a text output, the Entities card supports multiple special rows for buttons, attributes, web links, dividers and sections, etc.
|
Rather than only displaying an entity's state as a text output, the Entities card supports multiple special rows for buttons, attributes, web links, dividers and sections, etc.
|
||||||
|
|
||||||
|
### Attribute
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
type:
|
||||||
|
required: true
|
||||||
|
description: "`attribute`"
|
||||||
|
type: string
|
||||||
|
entity:
|
||||||
|
required: true
|
||||||
|
description: Entity ID.
|
||||||
|
type: string
|
||||||
|
attribute:
|
||||||
|
required: true
|
||||||
|
description: Attribute to display from the entity.
|
||||||
|
type: string
|
||||||
|
prefix:
|
||||||
|
required: false
|
||||||
|
description: Text before entity state.
|
||||||
|
type: string
|
||||||
|
suffix:
|
||||||
|
required: false
|
||||||
|
description: Text after entity state.
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
required: false
|
||||||
|
description: Overwrites friendly entity name.
|
||||||
|
type: string
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
### Button
|
### Button
|
||||||
|
|
||||||
|
Row with an (optional) icon, label and a single text button at the end of the row that can trigger a defined action.
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
type:
|
type:
|
||||||
required: true
|
required: true
|
||||||
@ -126,11 +149,11 @@ type:
|
|||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
required: true
|
required: true
|
||||||
description: Main Label.
|
description: Main label.
|
||||||
type: string
|
type: string
|
||||||
icon:
|
icon:
|
||||||
required: false
|
required: false
|
||||||
description: An icon to display to the left of the label.
|
description: An icon to display to the left of the main label.
|
||||||
type: string
|
type: string
|
||||||
action_name:
|
action_name:
|
||||||
required: false
|
required: false
|
||||||
@ -151,6 +174,61 @@ double_tap_action:
|
|||||||
type: map
|
type: map
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
### Buttons
|
||||||
|
|
||||||
|
Multiple buttons displayed in a single row next to each other. See examples further below.
|
||||||
|
|
||||||
|
{% configuration %}
|
||||||
|
type:
|
||||||
|
required: true
|
||||||
|
description: "`buttons`"
|
||||||
|
type: string
|
||||||
|
entities:
|
||||||
|
required: true
|
||||||
|
description: A list of entities to show. Each entry is either an entity ID or a map.
|
||||||
|
type: list
|
||||||
|
keys:
|
||||||
|
entity:
|
||||||
|
required: true
|
||||||
|
description: Entity ID.
|
||||||
|
type: string
|
||||||
|
icon:
|
||||||
|
required: false
|
||||||
|
description: Override the entity icon.
|
||||||
|
type: string
|
||||||
|
image:
|
||||||
|
required: false
|
||||||
|
description: Override the entity image.
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
required: false
|
||||||
|
description: Override the friendly entity name.
|
||||||
|
type: string
|
||||||
|
default: Entity name
|
||||||
|
show_name:
|
||||||
|
required: false
|
||||||
|
description: If false, the button name is not shown.
|
||||||
|
type: boolean
|
||||||
|
default: "true"
|
||||||
|
show_icon:
|
||||||
|
required: false
|
||||||
|
description: If false, the icon is not shown.
|
||||||
|
type: boolean
|
||||||
|
default: "true"
|
||||||
|
tap_action:
|
||||||
|
required: false
|
||||||
|
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||||
|
type: map
|
||||||
|
hold_action:
|
||||||
|
required: false
|
||||||
|
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||||
|
type: map
|
||||||
|
double_tap_action:
|
||||||
|
required: false
|
||||||
|
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||||
|
type: map
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
### Cast
|
### Cast
|
||||||
|
|
||||||
Special row to start Home Assistant Cast.
|
Special row to start Home Assistant Cast.
|
||||||
@ -170,12 +248,12 @@ view:
|
|||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
required: false
|
required: false
|
||||||
description: Name to show in the row
|
description: Name to show in the row.
|
||||||
type: string
|
type: string
|
||||||
default: Home Assistant Cast
|
default: Home Assistant Cast
|
||||||
icon:
|
icon:
|
||||||
required: false
|
required: false
|
||||||
description: Icon to use
|
description: Icon to use.
|
||||||
type: string
|
type: string
|
||||||
default: "`hass:television`"
|
default: "`hass:television`"
|
||||||
hide_if_unavailable:
|
hide_if_unavailable:
|
||||||
@ -244,7 +322,7 @@ type:
|
|||||||
type: string
|
type: string
|
||||||
label:
|
label:
|
||||||
required: false
|
required: false
|
||||||
description: Section label
|
description: Section label.
|
||||||
type: string
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
@ -257,81 +335,20 @@ type:
|
|||||||
type: string
|
type: string
|
||||||
url:
|
url:
|
||||||
required: true
|
required: true
|
||||||
description: "Website URL (or internal URL e.g., `/hassio/dashboard` or `/panel_custom_name`)"
|
description: "Website URL (or internal URL e.g., `/hassio/dashboard` or `/panel_custom_name`)."
|
||||||
type: string
|
type: string
|
||||||
name:
|
name:
|
||||||
required: false
|
required: false
|
||||||
description: Link label
|
description: Link label.
|
||||||
type: string
|
type: string
|
||||||
default: URL path
|
default: URL path
|
||||||
icon:
|
icon:
|
||||||
required: false
|
required: false
|
||||||
description: "Icon to display (e.g., `mdi:home`)"
|
description: "Icon to display (e.g., `mdi:home`)."
|
||||||
type: string
|
type: string
|
||||||
default: "`mdi:link`"
|
default: "`mdi:link`"
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
### Buttons
|
|
||||||
|
|
||||||
Multiple buttons displayed in a single row next to each other. See examples further below.
|
|
||||||
|
|
||||||
{% configuration %}
|
|
||||||
type:
|
|
||||||
required: true
|
|
||||||
description: "`buttons`"
|
|
||||||
type: string
|
|
||||||
entities:
|
|
||||||
required: true
|
|
||||||
description: A list of entities to show. Each entry is either an entity ID or a map.
|
|
||||||
type: list
|
|
||||||
keys:
|
|
||||||
entity:
|
|
||||||
required: true
|
|
||||||
description: Entity ID
|
|
||||||
type: string
|
|
||||||
icon:
|
|
||||||
required: false
|
|
||||||
description: Override the entity icon.
|
|
||||||
type: string
|
|
||||||
image:
|
|
||||||
required: false
|
|
||||||
description: Override the entity image.
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
required: false
|
|
||||||
description: Label for the button
|
|
||||||
type: string
|
|
||||||
{% endconfiguration %}
|
|
||||||
|
|
||||||
### Attribute
|
|
||||||
|
|
||||||
{% configuration %}
|
|
||||||
type:
|
|
||||||
required: true
|
|
||||||
description: "`attribute`"
|
|
||||||
type: string
|
|
||||||
entity:
|
|
||||||
required: true
|
|
||||||
description: Entity ID
|
|
||||||
type: string
|
|
||||||
attribute:
|
|
||||||
required: true
|
|
||||||
description: Attribute to display from the entity.
|
|
||||||
type: string
|
|
||||||
prefix:
|
|
||||||
required: false
|
|
||||||
description: Text before entity state.
|
|
||||||
type: string
|
|
||||||
suffix:
|
|
||||||
required: false
|
|
||||||
description: Text after entity state.
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
required: false
|
|
||||||
description: Overwrites friendly name.
|
|
||||||
type: string
|
|
||||||
{% endconfiguration %}
|
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Entity rows
|
### Entity rows
|
||||||
|
Loading…
x
Reference in New Issue
Block a user