Add tile features documentation (#25080)

This commit is contained in:
Paul Bottein 2022-11-30 18:48:59 +01:00 committed by GitHub
parent 6a0da1a6bc
commit 275e6cf40a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 128 additions and 11 deletions

View File

@ -49,25 +49,142 @@ icon_tap_action:
required: false
description: Action taken on icon card tap. See [action documentation](/dashboards/actions/#tap-action). By default, it will `toggle` the entity (if possible), otherwise, show the "more-info" dialog.
type: map
features:
required: false
description: Additional widgets to control your entity. See [available features](/dashboards/tile/#tile-features).
type: list
{% endconfiguration %}
## Example
## Examples
Alternatively, the card can be configured using YAML:
```yaml
- type: tile
type: tile
entity: cover.kitchen_window
- type: tile
```
```yaml
type: tile
entity: light.bedroom
icon: mdi:lamp
color: yellow
- type: tile
```
```yaml
type: tile
entity: person.anne_therese
show_entity_picture: true
```
```yaml
type: tile
entity: vacuum.ground_floor
features:
- type: vacuum-commands
commands:
- start_pause
- return_home
```
## Available color tokens
Some color tokens are available to colorize the tile card : `primary`, `accent`, `disabled`, `red`, `pink`, `purple`, `deep-purple`, `indigo`, `blue`, `light-blue`, `cyan`, `teal`, `green`, `light-green`, `lime`, `yellow`, `amber`, `orange`, `deep-orange`, `brown`, `grey`, `blue-grey`, `black` and `white`.
## Tile features
Some entities have support for "features". These widgets add quick controls to the tile card.
### Cover open/close
Widget that display buttons to open, close or stop a [cover](/integrations/cover).
<p class='img'>
<img src='/images/dashboards/tile-features/cover_open_close.png' alt='Screenshot of the tile card with open/close feature'>
Screenshot of the tile card with cover open/close feature
</p>
```yaml
features:
- type: "cover-open-close"
```
{% configuration %}
type:
required: true
description: "`cover-open-close`"
type: string
{% endconfiguration %}
### Cover tilt
Widget that display buttons to open, close or stop a [cover](/integrations/cover).
<p class='img'>
<img src='/images/dashboards/tile-features/cover_tilt.png' alt='Screenshot of the tile card with tilt feature'>
Screenshot of the tile card with cover tilt feature
</p>
```yaml
features:
- type: "cover-tilt"
```
{% configuration %}
type:
required: true
description: "`cover-tilt`"
type: string
{% endconfiguration %}
### Light brightness
Widget that display a slider to select the brightness for a [light](/integrations/light).
<p class='img'>
<img src='/images/dashboards/tile-features/light_brightness.png' alt='Screenshot of the tile card with light brightness feature'>
Screenshot of the tile card with light brightness feature
</p>
```yaml
features:
- type: "light-brightness"
```
{% configuration %}
type:
required: true
description: "`light-brightness`"
type: string
{% endconfiguration %}
### Vacuum commands
Widget that display buttons to control a [vacuum](/integrations/vacuum).
<p class='img'>
<img src='/images/dashboards/tile-features/vacuum_commands.png' alt='Screenshot of the tile card with vacuum commands feature'>
Screenshot of the tile card with vacuum commands feature
</p>
```yaml
features:
- type: "vacuum-commands"
commands:
- start_pause
- stop
- clean_spot
- locate
- return_home
```
{% configuration %}
type:
required: true
description: "`vacuum-commands`"
type: string
commands:
required: true
description: List of commands to show on the card. The list can contain `start_pause`, `stop`, `clean_spot`, `locate` and `return_home`.
type: list
{% endconfiguration %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB