From cc6e2594eaa9677cfa9acc3db3d633896924fb4a Mon Sep 17 00:00:00 2001 From: sjabby Date: Sun, 8 Jul 2018 21:54:16 +0200 Subject: [PATCH 1/5] Update picture-entity.markdown Minor cleanup and fixing typos Changed all config sections to use {% configuration %} tag. --- source/_lovelace/picture-entity.markdown | 90 ++++++++++++++++++------ 1 file changed, 69 insertions(+), 21 deletions(-) diff --git a/source/_lovelace/picture-entity.markdown b/source/_lovelace/picture-entity.markdown index b32f332759e..a6960fa3692 100644 --- a/source/_lovelace/picture-entity.markdown +++ b/source/_lovelace/picture-entity.markdown @@ -10,8 +10,6 @@ sharing: 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. 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.

-**Options** +{% linkable_title Options %} -| Name | Type | Default | Description -| ---- | ---- | ------- | ----------- -| type | string | **Required** | `picture-entity` -| entity | string | **Required** | Entity id to control via picture. -| camera_image | string | Optional | camera domain entity_id 'camera.demo_camera' -| image | string | Optional| URL of an image. -| state_image | object | Optional | See `state_image` object structure. -| name | string | Optional | Custom name for entity -| show_info | boolean | Optional | Set to false to hide infobar -| tap_action | string | dialog | Set to `toggle` for turning entity on/off without opening a dialog +{% configuration %} +type: + required: true + description: picture-entity + type: string +entity: + required: true + description: Entity id to control via picture. + type: string +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 -| Name | Type | Default | Description -| ---- | ---- | ------- | ----------- -| on | string | Optional | URL of an image used for on state. -| off | string | Optional | URL of an image used for off state. -| home | string | Optional | URL of an image used for home state. -| not_home | string | Optional | URL of an image used for not_home state. -| ... | string | Optional | Any state that is supported by the entity works +{% configuration %} +on: + required: true + description: URL of an image used for on state. + type: string + default: None +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: From 17555f2048c901e113c02a5279f99f3a11dfc4e9 Mon Sep 17 00:00:00 2001 From: sjabby Date: Sun, 8 Jul 2018 22:17:59 +0200 Subject: [PATCH 2/5] Update picture-entity.markdown --- source/_lovelace/picture-entity.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_lovelace/picture-entity.markdown b/source/_lovelace/picture-entity.markdown index a6960fa3692..714438b08d3 100644 --- a/source/_lovelace/picture-entity.markdown +++ b/source/_lovelace/picture-entity.markdown @@ -53,10 +53,10 @@ name: type: string default: None show_info: - required: 'false' + required: false description: Set to false to hide infobar type: boolean - default: 'true' + default: True tap_action: required: false description: "Set to `toggle` for turning entity on/off without opening a dialog" From 671db9c5e3924b4838148ade41eead668e9e6124 Mon Sep 17 00:00:00 2001 From: sjabby Date: Sun, 8 Jul 2018 22:33:01 +0200 Subject: [PATCH 3/5] Update picture-entity.markdown --- source/_lovelace/picture-entity.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_lovelace/picture-entity.markdown b/source/_lovelace/picture-entity.markdown index 714438b08d3..afa0f6fb7de 100644 --- a/source/_lovelace/picture-entity.markdown +++ b/source/_lovelace/picture-entity.markdown @@ -87,7 +87,7 @@ not_home: description: URL of an image used for not_home state. type: string default: None -...: +OTHER: required: false description: Any state that is supported by the entity works type: object From 8a54892a291c6cf99a8d8f371b3e9387a9880622 Mon Sep 17 00:00:00 2001 From: sjabby Date: Sun, 8 Jul 2018 22:55:10 +0200 Subject: [PATCH 4/5] Update picture-entity.markdown --- source/_lovelace/picture-entity.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/_lovelace/picture-entity.markdown b/source/_lovelace/picture-entity.markdown index afa0f6fb7de..b888b02453f 100644 --- a/source/_lovelace/picture-entity.markdown +++ b/source/_lovelace/picture-entity.markdown @@ -87,10 +87,10 @@ not_home: description: URL of an image used for not_home state. type: string default: None -OTHER: +any: required: false description: Any state that is supported by the entity works - type: object + type: 'object' default: None {% endconfiguration %} From 37324fbfd8c28f001cbf9e30bbc8b7da91ddce00 Mon Sep 17 00:00:00 2001 From: sjabby Date: Sun, 8 Jul 2018 23:05:29 +0200 Subject: [PATCH 5/5] Update picture-entity.markdown --- source/_lovelace/picture-entity.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_lovelace/picture-entity.markdown b/source/_lovelace/picture-entity.markdown index b888b02453f..60fc038ed2b 100644 --- a/source/_lovelace/picture-entity.markdown +++ b/source/_lovelace/picture-entity.markdown @@ -67,12 +67,12 @@ tap_action: `state_image` object structure {% configuration %} -on: +"on": required: true description: URL of an image used for on state. type: string default: None -off: +"off": required: true description: URL of an image used for off state. type: string @@ -90,7 +90,7 @@ not_home: any: required: false description: Any state that is supported by the entity works - type: 'object' + type: object default: None {% endconfiguration %}