Skip to content

Commit 5715c20

Browse files
andrey-gitfabaff
authored andcommitted
Update frontend_creating_custom_ui.markdown (home-assistant#3275)
1 parent 8f72d36 commit 5715c20

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

source/developers/frontend_creating_custom_ui.markdown

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,27 @@ If you would like to use your own [State card](/developers/frontend_add_card/) w
1313

1414
Put the element source file and its dependencies in `www/custom_ui/` directory under your Home Assistant [configuration](/docs/configuration/) directory.
1515

16-
For example if creating a state card for the `light` domain named `my_custom_light_card` put `state-card-my_custom_light_card.html` in `www/custom_ui/`.
16+
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/`.
1717

18-
That file should implement `<state-card-my_custom_light_card>` tag with Polymer.
18+
That file should implement `<my_custom_light_card>` tag with Polymer.
1919

20-
In `state-card-my_custom_light_card.html` you should use `<link rel="import">` to import all the dependencies **not** used by Home Assistant's UI.
20+
In `my_custom_light_card.html` you should use `<link rel="import">` to import all the dependencies **not** used by Home Assistant's UI.
2121
Do not import any dependencies used by the Home Assistant UI.
2222
Importing those will work in `development: 1` mode, but will fail in production mode.
2323

24-
In the `customize:` section of the `configuration.yaml` file put `custom_ui_state_card: <element-name>`.
24+
1) In the `customize:` section of the `configuration.yaml` file put `custom_ui_state_card: <element-name>`.
25+
2) In the `frontend` section use `extra_html_url` to specify the URL to load.
2526

2627
For example:
2728
```yaml
2829
homeassistant:
2930
customize:
30-
- entity_id: light
31+
light.bedroom:
3132
custom_ui_state_card: my_custom_light_card
33+
34+
frontend:
35+
extra_html_url:
36+
- /local/custom_ui/my_custom_light_card.html
3237
```
3338
3439
For more possibilities, see the [Custom UI section](/cookbook/#user-interface) on our Examples page.

0 commit comments

Comments
 (0)