Lovelace: Docs for special rows (#5858)

* Lovelace: Docs for special rows

* Row

* Add call-service
This commit is contained in:
c727 2018-07-24 15:56:31 +02:00 committed by Paulus Schoutsen
parent de70830e12
commit 7b46760299

View File

@ -59,8 +59,76 @@ secondary_info:
type: string
{% endconfiguration %}
## {% linkable_title Secial Row Elements %}
### {% linkable_title Call Service %}
{% configuration %}
type:
required: true
description: call-service
type: string
name:
required: true
description: Main Label.
type: string
icon:
required: true
description: "Icon to display (e.g. `mdi:home`)"
type: string
action_name:
required: true
description: Button label.
type: string
service:
required: true
description: "Service like `media_player.media_play_pause`"
type: string
service_data:
required: true
description: The service data to use.
type: object
{% endconfiguration %}
### {% linkable_title Weblink %}
{% configuration %}
type:
required: true
description: weblink
type: string
name:
required: true
description: Link label.
type: string
icon:
required: true
description: "Icon to display (e.g. `mdi:home`)"
type: string
url:
required: true
description: "Website URL."
type: string
{% endconfiguration %}
### {% linkable_title Divider %}
{% configuration %}
type:
required: true
description: divider
type: string
style:
required: false
description: Style the element using CSS.
type: object
default: "height: 1px, background-color: var(--secondary-text-color)"
{% endconfiguration %}
## {% linkable_title Example %}
Entity rows:
```yaml
- type: entities
title: Entities card sample
@ -73,3 +141,24 @@ secondary_info:
- group.all_lights
- group.all_locks
```
Special rows:
```yaml
- type: entities
title: Entities card sample
show_header_toggle: true
entities:
- type: call-service
icon: mdi:power
name: Bed light
action_name: Toggle light
service: light.toggle
service_data:
entity_id: light.bed_light
- type: divider
- type: weblink
name: Home Assistant
url: https://www.home-assistant.io/
icon: mdi:home-assistant
```