From fa61ff16c9d8fb62a2feabd3535c9764caf7ef9a Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 1 Aug 2024 13:50:43 +0200 Subject: [PATCH] Dashboard actions: Fix perform_action key (#34068) * Dashboard actions: Fix perform_action key * Update actions.markdown * Update actions.markdown --- source/dashboards/actions.markdown | 40 +++++++++++++++++++----------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/source/dashboards/actions.markdown b/source/dashboards/actions.markdown index 9f0f27fb3a3..9fbcac53d77 100644 --- a/source/dashboards/actions.markdown +++ b/source/dashboards/actions.markdown @@ -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