mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 17:27:19 +00:00
Update tap/hold actions to objects (#7751)
* Update tap/hold actions to objects * Update default action * typo
This commit is contained in:
parent
f19f47ec8d
commit
083f7c0554
@ -47,23 +47,54 @@ icon:
|
|||||||
default: Entity Domain Icon
|
default: Entity Domain Icon
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: "Set to `toggle` or `call-service` for direct actions."
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `none`)
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: `more-info`
|
||||||
hold_action:
|
navigation_path:
|
||||||
required: false
|
required: false
|
||||||
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `call-service`).
|
description: Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`
|
||||||
type: string
|
type: string
|
||||||
default: none
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "For `call-service`, e.g., `media_player.media_play_pause`"
|
description: Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service_data:
|
service_data:
|
||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
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: object
|
type: object
|
||||||
default: "entity_id: entity_id"
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
theme:
|
theme:
|
||||||
required: false
|
required: false
|
||||||
description: "Set to any theme within `themes.yaml`"
|
description: "Set to any theme within `themes.yaml`"
|
||||||
@ -77,9 +108,12 @@ Title and Script Service Example:
|
|||||||
```yaml
|
```yaml
|
||||||
- type: entity-button
|
- type: entity-button
|
||||||
name: Turn Off Lights
|
name: Turn Off Lights
|
||||||
tap_action: call-service
|
tap_action:
|
||||||
entity: script.turn_off_lights
|
action: call-service
|
||||||
service: script.turn_on
|
service: script.turn_on
|
||||||
|
service_data:
|
||||||
|
entity_id: script.turn_off_lights
|
||||||
|
entity: script.turn_off_lights
|
||||||
```
|
```
|
||||||
|
|
||||||
<p class='img'>
|
<p class='img'>
|
||||||
|
@ -69,23 +69,54 @@ icon:
|
|||||||
type: string
|
type: string
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: "Set to `toggle` or `call-service` for direct actions."
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `none`)
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: `more-info`
|
||||||
hold_action:
|
navigation_path:
|
||||||
required: false
|
required: false
|
||||||
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `call-service`).
|
description: Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`
|
||||||
type: string
|
type: string
|
||||||
default: none
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "For `call-service`, e.g., `media_player.media_play_pause`"
|
description: Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service_data:
|
service_data:
|
||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
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: object
|
type: object
|
||||||
default: "entity_id: entity_id"
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
## {% linkable_title Examples %}
|
||||||
|
@ -25,30 +25,9 @@ type:
|
|||||||
description: picture-elements
|
description: picture-elements
|
||||||
type: string
|
type: string
|
||||||
image:
|
image:
|
||||||
required: false
|
required: true
|
||||||
description: The URL of an image.
|
description: The URL of an image.
|
||||||
type: string
|
type: string
|
||||||
camera_image:
|
|
||||||
required: false
|
|
||||||
description: Camera entity as Background image.
|
|
||||||
type: string
|
|
||||||
state_image:
|
|
||||||
required: false
|
|
||||||
description: Background image based on entity state.
|
|
||||||
type: object
|
|
||||||
keys:
|
|
||||||
state:
|
|
||||||
type: string
|
|
||||||
required: false
|
|
||||||
description: "`state: image-url`, check the example below."
|
|
||||||
aspect_ratio:
|
|
||||||
required: false
|
|
||||||
description: "Forces the height of the image to be a ratio of the width. You may enter a value such as: `16x9`, `16:9`, `1.78`."
|
|
||||||
type: string
|
|
||||||
entity:
|
|
||||||
required: false
|
|
||||||
description: Entity to use for `state_image`.
|
|
||||||
type: string
|
|
||||||
elements:
|
elements:
|
||||||
required: true
|
required: true
|
||||||
description: List of elements
|
description: List of elements
|
||||||
@ -92,26 +71,54 @@ entity:
|
|||||||
type: string
|
type: string
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: more-info, toggle, navigate, call-service
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `none`)
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: `more-info`
|
||||||
hold_action:
|
|
||||||
required: false
|
|
||||||
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `navigate`, `call-service`).
|
|
||||||
type: string
|
|
||||||
default: none
|
|
||||||
navigation_path:
|
navigation_path:
|
||||||
required: false
|
required: false
|
||||||
description: Url path to navigate to (e.g., `/lovelace/1`)
|
description: Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "Service to call (e.g., `light.turn_on`)"
|
description: Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service_data:
|
service_data:
|
||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
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: object
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
style:
|
style:
|
||||||
required: true
|
required: true
|
||||||
description: Position and style the element using CSS.
|
description: Position and style the element using CSS.
|
||||||
@ -140,26 +147,54 @@ suffix:
|
|||||||
type: string
|
type: string
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: more-info, toggle, navigate, call-service
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `none`)
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: `more-info`
|
||||||
hold_action:
|
|
||||||
required: false
|
|
||||||
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `navigate`, `call-service`).
|
|
||||||
type: string
|
|
||||||
default: none
|
|
||||||
navigation_path:
|
navigation_path:
|
||||||
required: false
|
required: false
|
||||||
description: Url path to navigate to (e.g., `/lovelace/1`)
|
description: Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "Service to call (e.g., `light.turn_on`)"
|
description: Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service_data:
|
service_data:
|
||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
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: object
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
style:
|
style:
|
||||||
required: true
|
required: true
|
||||||
description: Position and style the element using CSS.
|
description: Position and style the element using CSS.
|
||||||
@ -214,26 +249,54 @@ entity:
|
|||||||
type: string
|
type: string
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: more-info, toggle, navigate, call-service
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `none`)
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: `more-info`
|
||||||
hold_action:
|
|
||||||
required: false
|
|
||||||
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `navigate`, `call-service`).
|
|
||||||
type: string
|
|
||||||
default: none
|
|
||||||
navigation_path:
|
navigation_path:
|
||||||
required: false
|
required: false
|
||||||
description: Url path to navigate to (e.g., `/lovelace/1`)
|
description: Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "Service to call (e.g., `light.turn_on`)"
|
description: Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service_data:
|
service_data:
|
||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
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: object
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
style:
|
style:
|
||||||
required: true
|
required: true
|
||||||
description: Position and style the element using CSS.
|
description: Position and style the element using CSS.
|
||||||
@ -254,26 +317,54 @@ entity:
|
|||||||
type: string
|
type: string
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: none, more-info, toggle, navigate, call-service
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `none`)
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: `more-info`
|
||||||
hold_action:
|
|
||||||
required: false
|
|
||||||
description: Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `navigate`, `call-service`).
|
|
||||||
type: string
|
|
||||||
default: none
|
|
||||||
navigation_path:
|
navigation_path:
|
||||||
required: false
|
required: false
|
||||||
description: Url path to navigate to (e.g., `/lovelace/1`)
|
description: Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "Service to call (e.g., `light.turn_on`)"
|
description: Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service_data:
|
service_data:
|
||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
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: object
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
image:
|
image:
|
||||||
required: false
|
required: false
|
||||||
description: The image to display.
|
description: The image to display.
|
||||||
@ -355,11 +446,12 @@ state_filter:
|
|||||||
## {% linkable_title How to use click-and-hold %}
|
## {% linkable_title How to use click-and-hold %}
|
||||||
|
|
||||||
If the option `hold_action` is specified, that action will be performed when the entity is clicked and held for half a second or more.
|
If the option `hold_action` is specified, that action will be performed when the entity is clicked and held for half a second or more.
|
||||||
Please note that the `tap_action` and `hold_action` share variables for `navigation_path`, `service` and `service_data`. It is therefore not possible to, e.g., call two different services when clicked and when held.
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
tap_action: toggle
|
tap_action:
|
||||||
hold_action: call-service
|
action: toggle
|
||||||
|
hold_action:
|
||||||
|
action: call-service
|
||||||
service: light.turn_on
|
service: light.turn_on
|
||||||
service_data:
|
service_data:
|
||||||
entity_id: light.bed_light
|
entity_id: light.bed_light
|
||||||
@ -373,13 +465,15 @@ service_data:
|
|||||||
image: /local/floorplan.png
|
image: /local/floorplan.png
|
||||||
elements:
|
elements:
|
||||||
- type: state-icon
|
- type: state-icon
|
||||||
tap_action: toggle
|
tap_action:
|
||||||
|
action: toggle
|
||||||
entity: light.ceiling_lights
|
entity: light.ceiling_lights
|
||||||
style:
|
style:
|
||||||
top: 47%
|
top: 47%
|
||||||
left: 42%
|
left: 42%
|
||||||
- type: state-icon
|
- type: state-icon
|
||||||
tap_action: toggle
|
tap_action:
|
||||||
|
action: toggle
|
||||||
entity: light.kitchen_lights
|
entity: light.kitchen_lights
|
||||||
style:
|
style:
|
||||||
top: 30%
|
top: 30%
|
||||||
@ -399,7 +493,8 @@ service_data:
|
|||||||
entity_id: group.all_lights
|
entity_id: group.all_lights
|
||||||
- type: icon
|
- type: icon
|
||||||
icon: mdi:home
|
icon: mdi:home
|
||||||
tap_action: navigate
|
tap_action:
|
||||||
|
action: navigate
|
||||||
navigation_path: /lovelace/0
|
navigation_path: /lovelace/0
|
||||||
style:
|
style:
|
||||||
top: 10%
|
top: 10%
|
||||||
@ -415,7 +510,8 @@ service_data:
|
|||||||
# state_image & state_filter - toggle on click
|
# state_image & state_filter - toggle on click
|
||||||
- type: image
|
- type: image
|
||||||
entity: light.living_room
|
entity: light.living_room
|
||||||
tap_action: toggle
|
tap_action:
|
||||||
|
action: toggle
|
||||||
image: /local/living_room.png
|
image: /local/living_room.png
|
||||||
state_image:
|
state_image:
|
||||||
"off": /local/living_room_off.png
|
"off": /local/living_room_off.png
|
||||||
@ -439,8 +535,11 @@ service_data:
|
|||||||
# Single image, state_filter - call-service on click
|
# Single image, state_filter - call-service on click
|
||||||
- type: image
|
- type: image
|
||||||
entity: media_player.living_room
|
entity: media_player.living_room
|
||||||
tap_action: call-service
|
tap_action:
|
||||||
|
action: call-service
|
||||||
service: media_player.media_play_pause
|
service: media_player.media_play_pause
|
||||||
|
service_data:
|
||||||
|
entity_id: media_player.living_room
|
||||||
image: /local/television.jpg
|
image: /local/television.jpg
|
||||||
filter: brightness(5%)
|
filter: brightness(5%)
|
||||||
state_filter:
|
state_filter:
|
||||||
|
@ -58,27 +58,54 @@ show_state:
|
|||||||
default: true
|
default: true
|
||||||
tap_action:
|
tap_action:
|
||||||
required: false
|
required: false
|
||||||
description: "Action to perform when clicked (e.g., `more-info`, `toggle`, `navigate`, `call-service`)."
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `none`)
|
||||||
type: string
|
type: string
|
||||||
default: more-info
|
default: `more-info`
|
||||||
hold_action:
|
|
||||||
required: false
|
|
||||||
description: "Action to perform when clicked-and-held (e.g., `more-info`, `toggle`, `navigate`, `call-service`)."
|
|
||||||
type: string
|
|
||||||
default: none
|
|
||||||
navigation_path:
|
navigation_path:
|
||||||
required: false
|
required: false
|
||||||
description: "Path to navigate to when action set to `navigate`."
|
description: Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: "For `call-service`, e.g., `media_player.media_play_pause`"
|
description: Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service_data:
|
service_data:
|
||||||
required: false
|
required: false
|
||||||
description: The service data to use.
|
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: object
|
type: object
|
||||||
default: "`entity_id: entity_id`"
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
## {% linkable_title Examples %}
|
||||||
|
@ -30,10 +30,6 @@ title:
|
|||||||
required: false
|
required: false
|
||||||
description: The card title.
|
description: The card title.
|
||||||
type: string
|
type: string
|
||||||
navigation_path:
|
|
||||||
required: false
|
|
||||||
description: Navigate to path on tap action.
|
|
||||||
type: string
|
|
||||||
image:
|
image:
|
||||||
required: false
|
required: false
|
||||||
description: Background image URL.
|
description: Background image URL.
|
||||||
@ -59,6 +55,56 @@ entity:
|
|||||||
required: false
|
required: false
|
||||||
description: Entity to use for `state_image`.
|
description: Entity to use for `state_image`.
|
||||||
type: string
|
type: string
|
||||||
|
tap_action:
|
||||||
|
required: false
|
||||||
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
|
hold_action:
|
||||||
|
required: false
|
||||||
|
description: Action to take on tap-and-hold
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Options For Entities %}
|
## {% linkable_title Options For Entities %}
|
||||||
|
@ -26,18 +26,56 @@ image:
|
|||||||
required: true
|
required: true
|
||||||
description: The URL of an image.
|
description: The URL of an image.
|
||||||
type: string
|
type: string
|
||||||
|
tap_action:
|
||||||
|
required: false
|
||||||
|
description: Action to take on tap
|
||||||
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `none`)
|
||||||
|
type: string
|
||||||
|
default: `more-info`
|
||||||
navigation_path:
|
navigation_path:
|
||||||
required: false
|
required: false
|
||||||
description: Path of URL to navigate to.
|
description: Path to navigate to (e.g. `/lovelace/0/`) when `action` defined as `navigate`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service:
|
service:
|
||||||
required: false
|
required: false
|
||||||
description: The service to call.
|
description: Service to call (e.g. `media_player.media_play_pause`) when `action` defined as `call-service`
|
||||||
type: string
|
type: string
|
||||||
|
default: none
|
||||||
service_data:
|
service_data:
|
||||||
required: false
|
required: false
|
||||||
description: The service data.
|
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: object
|
type: object
|
||||||
|
keys:
|
||||||
|
action:
|
||||||
|
required: true
|
||||||
|
description: Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `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
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
## {% linkable_title Examples %}
|
## {% linkable_title Examples %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user