From 5509b214bcd9ded0efcf4a37991e43432b31f75f Mon Sep 17 00:00:00 2001 From: Ian Richardson Date: Tue, 3 Sep 2019 10:49:58 -0500 Subject: [PATCH 1/2] Update views.markdown https://github.com/home-assistant/home-assistant-polymer/pull/3552 --- source/lovelace/views.markdown | 40 +++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/source/lovelace/views.markdown b/source/lovelace/views.markdown index 90521bd346b3..0ff5a3c4c862 100644 --- a/source/lovelace/views.markdown +++ b/source/lovelace/views.markdown @@ -22,7 +22,7 @@ views: type: string badges: required: false - description: List of entities IDs to display as badge. + description: List of entities IDs or `badge` objects to display as badges. type: list cards: required: false @@ -52,6 +52,44 @@ views: type: string {% endconfiguration %} +## Options For Badges + +If you define badges as objects instead of strings (by adding `entity:` before entity ID), allowing you to add more customizations: + +{% configuration %} +entity: + required: true + description: Home Assistant entity ID. + type: string +name: + required: false + description: Overwrites friendly name. + type: string +icon: + required: false + description: Overwrites icon or entity picture. + type: string +image: + required: false + description: The URL of an image. + type: string +{% endconfiguration %} + +### Example + +View config: + +```yaml +- title: Living room + badges: + - device_tracker.demo_paulus + - entity: light.ceiling_lights + name: Ceiling Lights + icon: mdi:bulb + - entity: switch.decorative_lights + image: /local/lights.png +``` + ## Paths You can link to one view from another view by its path. For this use cards that support navigation (`navigation_path`). Do not use special characters in paths. From 93f5893d44585bffed2cbcb612a49e8c514371c2 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 18 Sep 2019 13:07:52 +0200 Subject: [PATCH 2/2] :ambulance: Fixed build --- source/lovelace/views.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lovelace/views.markdown b/source/lovelace/views.markdown index 0ff5a3c4c862..0e16aff7c1a8 100644 --- a/source/lovelace/views.markdown +++ b/source/lovelace/views.markdown @@ -56,7 +56,7 @@ views: If you define badges as objects instead of strings (by adding `entity:` before entity ID), allowing you to add more customizations: -{% configuration %} +{% configuration badges %} entity: required: true description: Home Assistant entity ID.