From c879b70a20441112d253950253963c5990ecb603 Mon Sep 17 00:00:00 2001 From: Bo Date: Tue, 6 Oct 2020 12:35:34 +0200 Subject: [PATCH] Update documentation for Entites card - special row button and confirmation (#14937) Co-authored-by: Daniel Bohman --- source/_lovelace/entities.markdown | 12 ++++++++++++ source/lovelace/actions.markdown | 17 ++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/source/_lovelace/entities.markdown b/source/_lovelace/entities.markdown index c514ddc5534..63540c99193 100644 --- a/source/_lovelace/entities.markdown +++ b/source/_lovelace/entities.markdown @@ -124,6 +124,10 @@ name: required: true description: Main Label. type: string +icon: + required: false + description: An icon to display to the left of the label. + type: string action_name: required: false description: Button label. @@ -361,6 +365,14 @@ entities: name: Home Assistant url: https://www.home-assistant.io/ icon: mdi:home-assistant + - type: button + name: Power cycle LibreELEC + icon: mdi:power-cycle + tap_action: + action: call-service + confirmation: + text: Are you sure you want to restart? + service: script.libreelec_power_cycle ```
diff --git a/source/lovelace/actions.markdown b/source/lovelace/actions.markdown index fafba26b913..34592a1ac43 100644 --- a/source/lovelace/actions.markdown +++ b/source/lovelace/actions.markdown @@ -167,6 +167,10 @@ double_tap_action: confirmation: text: Are you sure you want to restart? service: script.restart +hold_action: + action: call-service + confirmation: true + service: script.do_other_thing ``` {% configuration confirmation%} @@ -185,10 +189,21 @@ exemptions: {% configuration exemptions %} user: required: true - description: User id that can see the view tab. + description: User id that can see the view tab. For each user“s id listed, the confirmation dialog will NOT be shown. type: string {% endconfiguration %} +```yaml +double_tap_action: + action: call-service + confirmation: + text: Are you sure you want to restart? + exemptions: + - x9405b8c64ee49bb88c42000e0a9dfa8 + - 88bcfbdc39155d16c3b2d09cbf8b0367 + service: script.restart +``` + ## Examples Tap action implemented on an entity button card: