Update documentation for Entites card - special row button and confirmation (#14937)

Co-authored-by: Daniel Bohman <db@axiell.com>
This commit is contained in:
Bo 2020-10-06 12:35:34 +02:00 committed by GitHub
parent 7e242f0d4e
commit c879b70a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 1 deletions

View File

@ -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
```
<div class='note'>

View File

@ -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: