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:
Brad Johnson 2020-06-01 01:32:40 -06:00 committed by GitHub
parent 38553c8e5f
commit 3bf64d7c94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 1 deletions

View File

@ -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:

View File

@ -0,0 +1,11 @@
---
title: "Registering Resources"
---
Resources can be registered from the "Resources" tab of the Lovelace Configuration UI.
![Screenshot of the Resources tab, found at the top of the Lovelace Configuration UI](/img/en/frontend/lovelace-ui-resources-tab.png)
This tab is only available when the active user's profile has "advanced mode" enabled.
![Screenshot of the Advanced Mode selector found on the Profile page](/img/en/frontend/lovelace-ui-profile-advanced-mode.png)

View File

@ -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",
], ],
}, },
], ],

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB