Update picture-elements.markdown

Minor cleanup and fixing typos
Changed all config sections to use {% configuration %} tag.
This commit is contained in:
sjabby 2018-07-08 21:53:37 +02:00 committed by GitHub
parent f4e31fd156
commit 03c46d26a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
layout: page layout: page
title: "Picture Elements Card" title: "Picture Elements Card"
sidebar_label: Picture Elements sidebar_label: Picture Elements
description: "TBD" description: "Picture elements card is one of the most versatile type of cards"
date: 2018-07-01 10:28 +00:00 date: 2018-07-01 10:28 +00:00
sidebar: true sidebar: true
comments: false comments: false
@ -10,76 +10,165 @@ sharing: true
footer: true footer: true
--- ---
### Picture elements Picture elements card is one of the most versatile type of cards.
Picture elements card is one of the most versatile type of cards. I am almost sure that those that like to customize a lot in their home assistant interface will **love** this card. The cards allows you to position icons or text and even services! on an image based on coordinates. Imagine floor plan, imagine [picture-glance](/lovelace/picture-glance/) with no restrictions!
The cards allows you to position icons or text and even services! on an image based on coordinates. Imagine floor plan, imagine [picture-glance](card-picture-glance.md) with no restrictions!
You can customize tap action and even icon color. You can customize tap action and even icon color.
![floor-plan](https://user-images.githubusercontent.com/7738048/42103244-26bec55a-7bd1-11e8-8bc9-6a130c513f9e.gif) <p class='img'>
<img src='/images/lovelace/lovelace_picture_elements.gif' alt='Screenshot of the picture elements card'>
Screenshot of the picture elements card.
</p>
**Options** {% linkable_title Options %}
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- type:
| type | string | **Required** | `picture-elements` required: true
| image | string | **Required** | URL of an image description: picture-elements
| elements | list | **Required** | List of elements type: string
| title | string | Optional | Card title image:
required: true
description: URL of an image
type: string
elements:
required: true
description: List of elements
type: list
title:
required: false
description: Card title
type: string
default: none
{% endconfiguration %}
Element types: Element types:
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- type:
| type | string | **Required** | `navigation` required: true
| navigation_path | string | **Required** | navigation_path of URL to navigate to description: navigation
| icon | string | Optional | Icon type: string
navigation_path:
required: true
description: navigation_path of URL to navigate to
type: string
icon:
required: false
description: Icon
type: string
default: none
{% endconfiguration %}
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- type:
| type | string | **Required** | `state-badge` required: true
| entity | string | **Required** | Entity id description: state-badge
| style | object | **Required** | See "Style options" type: string
entity:
required: true
description: Entity id
type: string
style:
required: true
description: See "Style options"
type: object
{% endconfiguration %}
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- type:
| type | string | **Required** | `state-icon` required: true
| entity | string | **Required** | Entity id description: state-icon
| style | object | **Required** | See "Style options" type: string
| tap_action | string | more-info | Set to `toggle` to change state entity:
required: true
description: Entity id
type: string
style:
required: true
description: See "Style options"
type: object
tap_action:
required: true
description: "Set to `toggle` to change state"
type: string
default: more-info
{% endconfiguration %}
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- type:
| type | string | **Required** | `state-label` required: true
| entity | string | **Required** | Entity id description: state-label
| style | object | **Required** | See "Style options" type: string
entity:
required: true
description: Entity id
type: string
style:
required: true
description: See "Style options"
type: object
{% endconfiguration %}
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- type:
| type | string | **Required** | `service-button` required: true
| service | string | **Required** | `light.turn_on` description: service-button
| service_data | object | Optional | See `service_data` object structure. type: string
| style | object | **Required** | See "Style options" service:
| title | string | Optional | Button label required: true
description: light.turn_on
type: string
service_data:
required: false
description: "See `service_data` object structure."
type: object
default: none
style:
required: true
description: See "Style options"
type: object
title:
required: false
description: Button label
type: string
default: none
{% endconfiguration %}
`service_data` object structure `service_data` object structure
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- entity_id:
| entity_id | string | **Required** | 'light.floor' required: true
description: light.floor
type: string
{% endconfiguration %}
Style options (CSS): Style options (CSS):
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- left:
| left | string | **Required** | Position from left, `25%` required: true
| top | string | **Required** | Position from top, `50%` description: Position from left, "25%"
| ... | string | inherit | ... type: string
| "--paper-item-icon-color" | string | inherit | Badge-icon off-color, `green` top:
required: true
description: Position from top, "50%"
type: string
...:
required: inherit
description: ...
type: string
default: none
"--paper-item-icon-color":
required: inherit
description: "Badge-icon off-color, `green`"
type: string
default: none
{% endconfiguration %}
**Example** {% linkable_title Example %}
```yaml ```yaml
- type: picture-elements - type: picture-elements