Skip to content

Commit 91b5ca9

Browse files
c727fabaff
authored andcommitted
Added instructions for custom UIs to show up in the HA dev info panel (home-assistant#4903)
* Update frontend_creating_custom_ui.markdown Added instructions for custom UIs to show up in the HA dev info panel home-assistant/frontend#981 * Use note class * Update frontend_creating_custom_ui.markdown
1 parent 80a42eb commit 91b5ca9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

source/developers/frontend_creating_custom_ui.markdown

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ frontend:
5353
</dom-module>
5454
5555
<script>
56+
// show the version of your custom UI in the HA dev info panel (HA 0.66.0+):
57+
const CUSTOM_UI_NAME = 'state-card-my-custom-light';
58+
const CUSTOM_UI_VERSION = '20180312';
59+
const CUSTOM_UI_URL = 'https://home-assistant.io/developers/frontend_creating_custom_ui/';
60+
61+
if (!window.CUSTOM_UI_LIST) {
62+
window.CUSTOM_UI_LIST = [];
63+
}
64+
window.CUSTOM_UI_LIST.push({
65+
name: CUSTOM_UI_NAME,
66+
version: CUSTOM_UI_VERSION,
67+
url: CUSTOM_UI_URL
68+
});
69+
5670
class StateCardMyCustomLight extends Polymer.Element {
5771
static get is() { return 'state-card-my-custom-light'; }
5872
@@ -77,5 +91,8 @@ class StateCardMyCustomLight extends Polymer.Element {
7791
customElements.define(StateCardMyCustomLight.is, StateCardMyCustomLight);
7892
</script>
7993
```
94+
<p class='note'>
95+
Some browsers don't support latest ECMAScript standards, these require a separate ES5 compatible file (`extra_html_url_es5`).
96+
</p>
8097

8198
For more possibilities, see the [Custom UI section](/cookbook/#user-interface) on our Examples page.

0 commit comments

Comments
 (0)