mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Added instructions for custom UIs to show up in the HA dev info panel (#4903)
* Update frontend_creating_custom_ui.markdown Added instructions for custom UIs to show up in the HA dev info panel https://github.com/home-assistant/home-assistant-polymer/pull/981 * Use note class * Update frontend_creating_custom_ui.markdown
This commit is contained in:
parent
80a42eb899
commit
91b5ca9511
@ -53,6 +53,20 @@ frontend:
|
|||||||
</dom-module>
|
</dom-module>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
// show the version of your custom UI in the HA dev info panel (HA 0.66.0+):
|
||||||
|
const CUSTOM_UI_NAME = 'state-card-my-custom-light';
|
||||||
|
const CUSTOM_UI_VERSION = '20180312';
|
||||||
|
const CUSTOM_UI_URL = 'https://home-assistant.io/developers/frontend_creating_custom_ui/';
|
||||||
|
|
||||||
|
if (!window.CUSTOM_UI_LIST) {
|
||||||
|
window.CUSTOM_UI_LIST = [];
|
||||||
|
}
|
||||||
|
window.CUSTOM_UI_LIST.push({
|
||||||
|
name: CUSTOM_UI_NAME,
|
||||||
|
version: CUSTOM_UI_VERSION,
|
||||||
|
url: CUSTOM_UI_URL
|
||||||
|
});
|
||||||
|
|
||||||
class StateCardMyCustomLight extends Polymer.Element {
|
class StateCardMyCustomLight extends Polymer.Element {
|
||||||
static get is() { return 'state-card-my-custom-light'; }
|
static get is() { return 'state-card-my-custom-light'; }
|
||||||
|
|
||||||
@ -77,5 +91,8 @@ class StateCardMyCustomLight extends Polymer.Element {
|
|||||||
customElements.define(StateCardMyCustomLight.is, StateCardMyCustomLight);
|
customElements.define(StateCardMyCustomLight.is, StateCardMyCustomLight);
|
||||||
</script>
|
</script>
|
||||||
```
|
```
|
||||||
|
<p class='note'>
|
||||||
|
Some browsers don't support latest ECMAScript standards, these require a separate ES5 compatible file (`extra_html_url_es5`).
|
||||||
|
</p>
|
||||||
|
|
||||||
For more possibilities, see the [Custom UI section](/cookbook/#user-interface) on our Examples page.
|
For more possibilities, see the [Custom UI section](/cookbook/#user-interface) on our Examples page.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user