mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-13 04:16:48 +00:00
Tap action page (#12229)
* Add tap-action document * Add commas * Apply suggestions from code review Co-Authored-By: Franck Nijhof <frenck@frenck.nl> Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
025f5e6ffe
commit
361cec272f
@ -17,6 +17,7 @@
|
||||
<li>{% active_link /lovelace/header-footer/ Headers & Footers %}</li>
|
||||
<li>{% active_link /lovelace/yaml-mode/ YAML mode %}</li>
|
||||
<li>{% active_link /lovelace/views/ Views %}</li>
|
||||
<li>{% active_link /lovelace/actions/ Actions %}</li>
|
||||
<li><a href='https://developers.home-assistant.io/docs/en/lovelace_custom_card.html'>Developing Custom Cards <i icon='icon-external-link'></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -57,129 +57,22 @@ state_color:
|
||||
default: true
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
theme:
|
||||
required: false
|
||||
description: "Set to any theme within `themes.yaml`"
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Confirmation
|
||||
|
||||
If you define confirmation as an object instead of boolean, you can add more customization and configurations:
|
||||
{% configuration %}
|
||||
text:
|
||||
required: false
|
||||
description: Text to present in the confirmation dialog.
|
||||
type: string
|
||||
exemptions:
|
||||
required: false
|
||||
description: "List of `exemption` objects. See below"
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Exemptions
|
||||
|
||||
{% configuration badges %}
|
||||
|
@ -99,94 +99,16 @@ state_color:
|
||||
default: false
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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 taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
{% endconfiguration %}
|
||||
|
||||
## Special Row Elements
|
||||
|
@ -87,123 +87,16 @@ show_state:
|
||||
default: true
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Confirmation
|
||||
|
||||
If you define confirmation as an object instead of boolean, you can add more customization and configurations:
|
||||
{% configuration %}
|
||||
text:
|
||||
required: false
|
||||
description: Text to present in the confirmation dialog.
|
||||
type: string
|
||||
exemptions:
|
||||
required: false
|
||||
description: "List of `exemption` objects. See below"
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Exemptions
|
||||
|
@ -64,109 +64,16 @@ title:
|
||||
type: string
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
### Icon representing an entity state
|
||||
@ -228,76 +135,18 @@ tap_action:
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
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 to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
style:
|
||||
required: true
|
||||
description: Position and style the element using CSS.
|
||||
@ -330,109 +179,16 @@ title:
|
||||
type: string
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
style:
|
||||
required: true
|
||||
description: Position and style the element using CSS.
|
||||
@ -487,109 +243,16 @@ entity:
|
||||
type: string
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
style:
|
||||
required: true
|
||||
description: Position and style the element using CSS.
|
||||
@ -614,109 +277,16 @@ title:
|
||||
type: string
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
image:
|
||||
required: false
|
||||
description: The image to display.
|
||||
@ -786,20 +356,6 @@ elements:
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Confirmation
|
||||
|
||||
If you define confirmation as an object instead of boolean, you can add more customization and configurations:
|
||||
{% configuration %}
|
||||
text:
|
||||
required: false
|
||||
description: Text to present in the confirmation dialog.
|
||||
type: string
|
||||
exemptions:
|
||||
required: false
|
||||
description: "List of `exemption` objects. See below"
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Exemptions
|
||||
|
||||
{% configuration badges %}
|
||||
|
@ -65,123 +65,16 @@ theme:
|
||||
type: string
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Confirmation
|
||||
|
||||
If you define confirmation as an object instead of boolean, you can add more customization and configurations:
|
||||
{% configuration %}
|
||||
text:
|
||||
required: false
|
||||
description: Text to present in the confirmation dialog.
|
||||
type: string
|
||||
exemptions:
|
||||
required: false
|
||||
description: "List of `exemption` objects. See below"
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Exemptions
|
||||
@ -226,6 +119,7 @@ state_image:
|
||||
Displaying a live feed from an FFmpeg camera:
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
type: picture-entity
|
||||
entity: camera.backdoor
|
||||
@ -237,6 +131,7 @@ tap_action:
|
||||
entity_id: camera.backdoor
|
||||
filename: '/shared/backdoor-{{ now().strftime("%Y-%m-%d-%H%M%S") }}.jpg'
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
The filename needs to be a path that is writable by Home Assistant in your system. You may need to configure `whitelist_external_dirs` ([documentation](/docs/configuration/basic/)).
|
||||
|
@ -69,109 +69,16 @@ theme:
|
||||
type: string
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Entities
|
||||
@ -194,113 +101,16 @@ show_state:
|
||||
default: true
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
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
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
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
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Confirmation
|
||||
|
||||
If you define confirmation as an object instead of boolean, you can add more customization and configurations:
|
||||
{% configuration %}
|
||||
text:
|
||||
required: false
|
||||
description: Text to present in the confirmation dialog.
|
||||
type: string
|
||||
exemptions:
|
||||
required: false
|
||||
description: "List of `exemption` objects. See below"
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Exemptions
|
||||
|
@ -26,123 +26,16 @@ theme:
|
||||
type: string
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
type: map
|
||||
keys:
|
||||
action:
|
||||
required: true
|
||||
description: "Action to perform (`call-service`, `navigate`, `url`, `none`)"
|
||||
type: string
|
||||
default: "`none`"
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action taken on card tap and hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
type: map
|
||||
keys:
|
||||
action:
|
||||
required: true
|
||||
description: "Action to perform (`call-service`, `navigate`, `url`, `none`)"
|
||||
type: string
|
||||
default: "`none`"
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action taken on card double tap. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Confirmation
|
||||
|
||||
If you define confirmation as an object instead of boolean, you can add more customization and configurations:
|
||||
{% configuration %}
|
||||
text:
|
||||
required: false
|
||||
description: Text to present in the confirmation dialog.
|
||||
type: string
|
||||
exemptions:
|
||||
required: false
|
||||
description: "List of `exemption` objects. See below"
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Exemptions
|
||||
|
198
source/lovelace/actions.markdown
Normal file
198
source/lovelace/actions.markdown
Normal file
@ -0,0 +1,198 @@
|
||||
---
|
||||
title: "Actions"
|
||||
description: "Define what an object does when interacted with."
|
||||
---
|
||||
|
||||
Some Lovelace cards have support for tap actions. These actions define what will happen when you tap or hold on an object within a card.
|
||||
|
||||
Actions can be enabled on:
|
||||
|
||||
- [Entity](/lovelace/entities/)
|
||||
- [Entity Button](/lovelace/entity-button/)
|
||||
- [Glance](/lovelace/glance/)
|
||||
- [Picture](/lovelace/picture/)
|
||||
- [Picture Element](/lovelace/picture-elements/)
|
||||
- [Picture Entity](/lovelace/picture-entity/)
|
||||
- [Picture Glance](/lovelace/picture-glance/)
|
||||
|
||||
## Tap-Action
|
||||
|
||||
Action that will be performed when an object on a card is tapped.
|
||||
|
||||
```yaml
|
||||
tap_action:
|
||||
action: toggle
|
||||
```
|
||||
|
||||
{% configuration tap-action %}
|
||||
tap_action:
|
||||
required: false
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
## Hold Action
|
||||
|
||||
Action that will be performed when an object on a card is tapped and held.
|
||||
|
||||
```yaml
|
||||
hold_action:
|
||||
action: toggle
|
||||
```
|
||||
|
||||
{% configuration hold_action %}
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
## Double-Tap Action
|
||||
|
||||
Action that will be performed when an object on a card is double-tapped.
|
||||
|
||||
```yaml
|
||||
double_tap_action:
|
||||
action: toggle
|
||||
```
|
||||
|
||||
{% configuration double_tap_action %}
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
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
|
||||
confirmation:
|
||||
required: false
|
||||
description: "Present a confirmation dialog to confirm the action. See `confirmation` object below"
|
||||
type: [boolean, map]
|
||||
default: "false"
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Confirmation
|
||||
|
||||
If you define confirmation as an object instead of boolean, you can add more customization and configurations.
|
||||
|
||||
```yaml
|
||||
hold_action:
|
||||
action: toggle
|
||||
```
|
||||
|
||||
{% configuration confirmation%}
|
||||
text:
|
||||
required: false
|
||||
description: Text to present in the confirmation dialog.
|
||||
type: string
|
||||
exemptions:
|
||||
required: false
|
||||
description: "List of `exemption` objects. See below"
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
## Options For Exemptions
|
||||
|
||||
{% configuration exemptions %}
|
||||
user:
|
||||
required: true
|
||||
description: User id that can see the view tab.
|
||||
type: string
|
||||
{% endconfiguration %}
|
||||
|
||||
## Examples
|
||||
|
||||
Tap action implemented on an entity button card:
|
||||
|
||||
```yaml
|
||||
type: button
|
||||
tap_action:
|
||||
action: toggle
|
||||
hold_action:
|
||||
action: more-info
|
||||
```
|
@ -29,15 +29,15 @@ image:
|
||||
type: string
|
||||
tap_action:
|
||||
required: false
|
||||
description: Action to take on tap.
|
||||
description: Action taken on card tap. See [action documentation](/lovelace/actions/#tap-action).
|
||||
type: map
|
||||
hold_action:
|
||||
required: false
|
||||
description: Action to take on tap-and-hold
|
||||
description: Action to take on tap-and-hold. See [action documentation](/lovelace/actions/#hold-action).
|
||||
type: map
|
||||
double_tap_action:
|
||||
required: false
|
||||
description: Action to take on double tap
|
||||
description: Action to take on tap-and-hold. See [action documentation](/lovelace/actions/#double-tap-action).
|
||||
type: map
|
||||
{% endconfiguration %}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user