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 required: true
description: Main Label. description: Main Label.
type: string type: string
icon:
required: false
description: An icon to display to the left of the label.
type: string
action_name: action_name:
required: false required: false
description: Button label. description: Button label.
@ -361,6 +365,14 @@ entities:
name: Home Assistant name: Home Assistant
url: https://www.home-assistant.io/ url: https://www.home-assistant.io/
icon: mdi:home-assistant 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'> <div class='note'>

View File

@ -167,6 +167,10 @@ double_tap_action:
confirmation: confirmation:
text: Are you sure you want to restart? text: Are you sure you want to restart?
service: script.restart service: script.restart
hold_action:
action: call-service
confirmation: true
service: script.do_other_thing
``` ```
{% configuration confirmation%} {% configuration confirmation%}
@ -185,10 +189,21 @@ exemptions:
{% configuration exemptions %} {% configuration exemptions %}
user: user:
required: true 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 type: string
{% endconfiguration %} {% endconfiguration %}
```yaml
double_tap_action:
action: call-service
confirmation:
text: Are you sure you want to restart?
exemptions:
- x9405b8c64ee49bb88c42000e0a9dfa8
- 88bcfbdc39155d16c3b2d09cbf8b0367
service: script.restart
```
## Examples ## Examples
Tap action implemented on an entity button card: Tap action implemented on an entity button card: