Timing tweaks. Fix #105
This commit is contained in:
parent
9848d6a195
commit
f94d0466f6
@ -10,6 +10,7 @@ _LOGGER = logging.getLogger(__name__)
|
||||
|
||||
async def async_setup(hass, config):
|
||||
|
||||
await setup_connection(hass, config)
|
||||
setup_view(hass)
|
||||
|
||||
aliases = {}
|
||||
@ -31,7 +32,6 @@ async def async_setup(hass, config):
|
||||
await hass.helpers.discovery.async_load_platform("light", DOMAIN, {}, config)
|
||||
await hass.helpers.discovery.async_load_platform("camera", DOMAIN, {}, config)
|
||||
|
||||
await setup_connection(hass, config)
|
||||
|
||||
await setup_service(hass)
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,7 +1,15 @@
|
||||
import { LitElement, html, css } from "card-tools/src/lit-element";
|
||||
import { registerCard } from "card-tools/src/editor";
|
||||
|
||||
class BrowserPlayerEditor extends LitElement {
|
||||
const bases = [customElements.whenDefined('home-assistant-main'), customElements.whenDefined('hui-view')];
|
||||
Promise.race(bases).then(() => {
|
||||
|
||||
const LitElement = customElements.get('home-assistant-main')
|
||||
? Object.getPrototypeOf(customElements.get('home-assistant-main'))
|
||||
: Object.getPrototypeOf(customElements.get('hui-view'));
|
||||
const html = LitElement.prototype.html;
|
||||
const css = LitElement.prototype.css;
|
||||
|
||||
class BrowserPlayerEditor extends LitElement {
|
||||
setConfig(config) {
|
||||
|
||||
}
|
||||
@ -12,10 +20,11 @@ class BrowserPlayerEditor extends LitElement {
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!customElements.get("browser-player-editor")) {
|
||||
if(!customElements.get("browser-player-editor")) {
|
||||
customElements.define("browser-player-editor", BrowserPlayerEditor);
|
||||
window.customCards = window.customCards || [];
|
||||
window.customCards.push({type:"browser-player", name: "Browser Player", preview: true});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,8 +1,16 @@
|
||||
import { LitElement, html, css } from "card-tools/src/lit-element";
|
||||
import { deviceID } from "card-tools/src/deviceId"
|
||||
import { moreInfo } from "card-tools/src/more-info"
|
||||
import "./browser-player-editor.js"
|
||||
|
||||
const bases = [customElements.whenDefined('home-assistant-main'), customElements.whenDefined('hui-view')];
|
||||
Promise.race(bases).then(() => {
|
||||
|
||||
const LitElement = customElements.get('home-assistant-main')
|
||||
? Object.getPrototypeOf(customElements.get('home-assistant-main'))
|
||||
: Object.getPrototypeOf(customElements.get('hui-view'));
|
||||
const html = LitElement.prototype.html;
|
||||
const css = LitElement.prototype.css;
|
||||
|
||||
class BrowserPlayer extends LitElement {
|
||||
|
||||
static get properties() {
|
||||
@ -114,3 +122,4 @@ class BrowserPlayer extends LitElement {
|
||||
|
||||
if(!customElements.get("browser-player"))
|
||||
customElements.define("browser-player", BrowserPlayer);
|
||||
});
|
||||
|
@ -440,4 +440,8 @@ class BrowserMod {
|
||||
|
||||
}
|
||||
|
||||
window.browser_mod = window.browser_mod || new BrowserMod();
|
||||
|
||||
const bases = [customElements.whenDefined('home-assistant-main'), customElements.whenDefined('hui-view')];
|
||||
Promise.race(bases).then(() => {
|
||||
window.browser_mod = window.browser_mod || new BrowserMod();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user