From f6b19dc1b78c82475768028680a7b46b95bf7f1d Mon Sep 17 00:00:00 2001 From: c727 Date: Thu, 12 Oct 2017 17:25:09 +0200 Subject: [PATCH] fix example for custom state cards (#3592) * change to state-card-my-custom-light * .html --- .../developers/frontend_creating_custom_ui.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/developers/frontend_creating_custom_ui.markdown b/source/developers/frontend_creating_custom_ui.markdown index 8303acbbb1b..51678f01cbb 100644 --- a/source/developers/frontend_creating_custom_ui.markdown +++ b/source/developers/frontend_creating_custom_ui.markdown @@ -13,15 +13,15 @@ If you would like to use your own [State card](/developers/frontend_add_card/) w Put the element source file and its dependencies in `www/custom_ui/` directory under your Home Assistant [configuration](/docs/configuration/) directory. -For example if creating a state card for the `light` domain named `my_custom_light_card` put `my_custom_light_card.html` in `www/custom_ui/`. +For example if creating a state card for the `light` domain named `state-card-my-custom-light` put `state-card-my-custom-light.html` in `www/custom_ui/`. -That file should implement `` tag with Polymer. +That file should implement `` tag with Polymer. -In `my_custom_light_card.html` you should use `` to import all the dependencies **not** used by Home Assistant's UI. +In `state-card-my-custom-light.html` you should use `` to import all the dependencies **not** used by Home Assistant's UI. Do not import any dependencies used by the Home Assistant UI. Importing those will work in `development: 1` mode, but will fail in production mode. -1) In the `customize:` section of the `configuration.yaml` file put `custom_ui_state_card: `. +1) In the `customize:` section of the `configuration.yaml` file put `custom_ui_state_card: state-card-my-custom-light`. 2) In the `frontend` section use `extra_html_url` to specify the URL to load. For example: @@ -29,11 +29,11 @@ For example: homeassistant: customize: light.bedroom: - custom_ui_state_card: my_custom_light_card + custom_ui_state_card: state-card-my-custom-light frontend: extra_html_url: - - /local/custom_ui/my_custom_light_card.html + - /local/custom_ui/state-card-my-custom-light.html ``` For more possibilities, see the [Custom UI section](/cookbook/#user-interface) on our Examples page.