mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-13 04:16:29 +00:00
Add instructions for registering resources to the custom cards guide (#560)
* Add instructions for registering resources to the custom cards guide * PR Feedback * Update static/_redirects * Update docs/frontend/custom-ui/lovelace-custom-card.md
This commit is contained in:
parent
38553c8e5f
commit
3bf64d7c94
@ -88,7 +88,7 @@ customElements.define('content-card-example', ContentCardExample);
|
|||||||
|
|
||||||
In our example card we defined a card with the tag `content-card-example` (see last line), so our card type will be `custom:content-card-example`. And because you created the file in your `<config>/www` directory, it will be accessible in your browser via the url `/local/` (if you have recently added the www folder you will need to re-start Home Assistant for files to be picked up).
|
In our example card we defined a card with the tag `content-card-example` (see last line), so our card type will be `custom:content-card-example`. And because you created the file in your `<config>/www` directory, it will be accessible in your browser via the url `/local/` (if you have recently added the www folder you will need to re-start Home Assistant for files to be picked up).
|
||||||
|
|
||||||
Add a resource to your Lovelace config with URL `/local/content-card-example.js` and type `module`.
|
[Add a resource to your Lovelace configuration](/docs/frontend/custom-ui/registering-resources) with URL `/local/content-card-example.js` and type `module`.
|
||||||
|
|
||||||
You can then use your card in your Lovelace configuration:
|
You can then use your card in your Lovelace configuration:
|
||||||
|
|
||||||
|
11
docs/frontend/custom-ui/registering-resources.md
Normal file
11
docs/frontend/custom-ui/registering-resources.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
---
|
||||||
|
title: "Registering Resources"
|
||||||
|
---
|
||||||
|
|
||||||
|
Resources can be registered from the "Resources" tab of the Lovelace Configuration UI.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This tab is only available when the active user's profile has "advanced mode" enabled.
|
||||||
|
|
||||||
|

|
@ -60,6 +60,7 @@ module.exports = {
|
|||||||
items: [
|
items: [
|
||||||
"frontend/custom-ui/lovelace-custom-card",
|
"frontend/custom-ui/lovelace-custom-card",
|
||||||
"frontend/custom-ui/creating-custom-panels",
|
"frontend/custom-ui/creating-custom-panels",
|
||||||
|
"frontend/custom-ui/registering-resources",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
BIN
static/img/en/frontend/lovelace-ui-profile-advanced-mode.png
Normal file
BIN
static/img/en/frontend/lovelace-ui-profile-advanced-mode.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
BIN
static/img/en/frontend/lovelace-ui-resources-tab.png
Normal file
BIN
static/img/en/frontend/lovelace-ui-resources-tab.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Loading…
x
Reference in New Issue
Block a user