Skip to content

Commit

Permalink
Update weather-card-editor.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Oct 5, 2020
1 parent e73a73a commit c185504
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions dist/weather-card-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ const LitElement = customElements.get("hui-masonry-view") ? Object.getPrototypeO
const html = LitElement.prototype.html;
const css = LitElement.prototype.css;

const helpers = await loadCardHelpers();
if (helpers.importMoreInfoControl) {
helpers.importMoreInfoControl("fan");
}
const HELPERS = window.loadCardHelpers();

export class WeatherCardEditor extends LitElement {
setConfig(config) {
Expand Down Expand Up @@ -68,6 +65,14 @@ export class WeatherCardEditor extends LitElement {
return this._config.number_of_forecasts || 5;
}

firstUpdated() {
HELPERS.then(help => {
if (help.importMoreInfoControl) {
help.importMoreInfoControl("fan");
}
})
}

render() {
if (!this.hass) {
return html``;
Expand Down

0 comments on commit c185504

Please sign in to comment.