Skip to content

Commit c185504

Browse files
authored
Update weather-card-editor.js
1 parent e73a73a commit c185504

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

dist/weather-card-editor.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ const LitElement = customElements.get("hui-masonry-view") ? Object.getPrototypeO
2222
const html = LitElement.prototype.html;
2323
const css = LitElement.prototype.css;
2424

25-
const helpers = await loadCardHelpers();
26-
if (helpers.importMoreInfoControl) {
27-
helpers.importMoreInfoControl("fan");
28-
}
25+
const HELPERS = window.loadCardHelpers();
2926

3027
export class WeatherCardEditor extends LitElement {
3128
setConfig(config) {
@@ -68,6 +65,14 @@ export class WeatherCardEditor extends LitElement {
6865
return this._config.number_of_forecasts || 5;
6966
}
7067

68+
firstUpdated() {
69+
HELPERS.then(help => {
70+
if (help.importMoreInfoControl) {
71+
help.importMoreInfoControl("fan");
72+
}
73+
})
74+
}
75+
7176
render() {
7277
if (!this.hass) {
7378
return html``;

0 commit comments

Comments
 (0)