Update picture-entity.markdown

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

View File

@ -10,8 +10,6 @@ sharing: true
footer: true footer: true
--- ---
### Entity picture
A very useful card for controling entities. By default you will get `more-info-dialog` but using `tap_action` you can directly control entities that have `on`/`off` states. It allows you to generate a very nice looking card with a big touch area, highly recommended for mobile dashboards on small screens. A very useful card for controling entities. By default you will get `more-info-dialog` but using `tap_action` you can directly control entities that have `on`/`off` states. It allows you to generate a very nice looking card with a big touch area, highly recommended for mobile dashboards on small screens.
You can use different image combination to get a more realistic view for images with lights. The image setup also allows enough flexibility to get your garage picture with the door opened and closed. You can use different image combination to get a more realistic view for images with lights. The image setup also allows enough flexibility to get your garage picture with the door opened and closed.
@ -23,30 +21,80 @@ You can also use `camera` domain entities to use that as `camera_image`.
Screenshot of the picture entity card. Screenshot of the picture entity card.
</p> </p>
**Options** {% linkable_title Options %}
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- type:
| type | string | **Required** | `picture-entity` required: true
| entity | string | **Required** | Entity id to control via picture. description: picture-entity
| camera_image | string | Optional | camera domain entity_id 'camera.demo_camera' type: string
| image | string | Optional| URL of an image. entity:
| state_image | object | Optional | See `state_image` object structure. required: true
| name | string | Optional | Custom name for entity description: Entity id to control via picture.
| show_info | boolean | Optional | Set to false to hide infobar type: string
| tap_action | string | dialog | Set to `toggle` for turning entity on/off without opening a dialog camera_image:
required: false
description: "Camera domain entity_id 'camera.demo_camera'"
type: string
default: None
image:
required: false
description: URL of an image.
type: string
default: None
state_image:
required: false
description: "See `state_image` object structure."
type: object
default: None
name:
required: false
description: Custom name for entity
type: string
default: None
show_info:
required: 'false'
description: Set to false to hide infobar
type: boolean
default: 'true'
tap_action:
required: false
description: "Set to `toggle` for turning entity on/off without opening a dialog"
type: string
default: dialog
{% endconfiguration %}
`state_image` object structure `state_image` object structure
| Name | Type | Default | Description {% configuration %}
| ---- | ---- | ------- | ----------- on:
| on | string | Optional | URL of an image used for on state. required: true
| off | string | Optional | URL of an image used for off state. description: URL of an image used for on state.
| home | string | Optional | URL of an image used for home state. type: string
| not_home | string | Optional | URL of an image used for not_home state. default: None
| ... | string | Optional | Any state that is supported by the entity works off:
required: true
description: URL of an image used for off state.
type: string
default: None
home:
required: false
description: URL of an image used for home state.
type: string
default: None
not_home:
required: false
description: URL of an image used for not_home state.
type: string
default: None
...:
required: false
description: Any state that is supported by the entity works
type: object
default: None
{% endconfiguration %}
**Examples** {% linkable_title Examples %}
Basic example: Basic example: