Dashboard actions: Fix perform_action key (#34068)

* Dashboard actions: Fix perform_action key

* Update actions.markdown

* Update actions.markdown
This commit is contained in:
Bram Kragten 2024-08-01 13:50:43 +02:00 committed by GitHub
parent b985b005b1
commit fa61ff16c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,7 +71,7 @@ tap_action:
description: "Path to navigate to (e.g., `https://www.home-assistant.io`) when the `action` is defined as `url`"
type: string
default: none
perform-action:
perform_action:
required: false
description: "Action to perform (e.g., `media_player.media_play_pause`) when the `action` is defined as `perform-action`"
type: string
@ -120,7 +120,7 @@ hold_action:
keys:
action:
required: true
description: "Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `url`, `assist`, `none`)"
description: "Action to perform (`more-info`, `toggle`, `perform-action`, `navigate`, `url`, `assist`, `none`)"
type: string
default: "`more-info`"
navigation_path:
@ -138,14 +138,19 @@ hold_action:
description: "Path to navigate to (e.g., `https://www.home-assistant.io`) when the `action` is defined as `url`"
type: string
default: none
service:
perform_action:
required: false
description: "Service to call (e.g., `media_player.media_play_pause`) when the `action` is defined as `call-service`"
description: "Action to perform (e.g., `media_player.media_play_pause`) when the `action` is defined as `perform-action`"
type: string
default: none
data:
required: false
description: "Service data to include (e.g., `entity_id: media_player.bedroom`) when the `action` is defined as `call-service`"
description: "Action data to include (e.g., `brightness: 100`) when the `action` is defined as `perform-action`"
type: string
default: none
target:
required: false
description: "Action target to user (e.g., `entity_id: media_player.bedroom`) when the `action` is defined as `perform-action`"
type: string
default: none
confirmation:
@ -182,7 +187,7 @@ double_tap_action:
keys:
action:
required: true
description: "Action to perform (`more-info`, `toggle`, `call-service`, `navigate`, `url`, `assist`, `none`)"
description: "Action to perform (`more-info`, `toggle`, `perform-action`, `navigate`, `url`, `assist`, `none`)"
type: string
default: "`more-info`"
navigation_path:
@ -200,14 +205,19 @@ double_tap_action:
description: "Path to navigate to (e.g., `https://www.home-assistant.io`) when the `action` is defined as `url`"
type: string
default: none
service:
perform_action:
required: false
description: "Service to call (e.g., `media_player.media_play_pause`) when the `action` is defined as `call-service`"
description: "Action to perform (e.g., `media_player.media_play_pause`) when the `action` is defined as `perform-action`"
type: string
default: none
data:
required: false
description: "Service data to include (e.g., `entity_id: media_player.bedroom`) when the `action` is defined as `call-service`"
description: "Action data to include (e.g., `brightness: 100`) when the `action` is defined as `perform-action`"
type: string
default: none
target:
required: false
description: "Action target to user (e.g., `entity_id: media_player.bedroom`) when the `action` is defined as `perform-action`"
type: string
default: none
confirmation:
@ -233,14 +243,14 @@ If you define confirmation as an object instead of boolean, you can add more cus
```yaml
double_tap_action:
action: call-service
action: perform-action
confirmation:
text: Are you sure you want to restart?
service: script.restart
perform_action: script.restart
hold_action:
action: call-service
action: perform-action
confirmation: true
service: script.do_other_thing
perform_action: script.do_other_thing
```
{% configuration confirmation%}
@ -265,13 +275,13 @@ user:
```yaml
double_tap_action:
action: call-service
action: perform-action
confirmation:
text: Are you sure you want to restart?
exemptions:
- user: x9405b8c64ee49bb88c42000e0a9dfa8
- user: 88bcfbdc39155d16c3b2d09cbf8b0367
service: script.restart
perform_action: script.restart
```
## Examples