File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,7 @@ const LitElement = customElements.get("hui-masonry-view") ? Object.getPrototypeO
22
22
const html = LitElement . prototype . html ;
23
23
const css = LitElement . prototype . css ;
24
24
25
- const helpers = await loadCardHelpers ( ) ;
26
- if ( helpers . importMoreInfoControl ) {
27
- helpers . importMoreInfoControl ( "fan" ) ;
28
- }
25
+ const HELPERS = window . loadCardHelpers ( ) ;
29
26
30
27
export class WeatherCardEditor extends LitElement {
31
28
setConfig ( config ) {
@@ -68,6 +65,14 @@ export class WeatherCardEditor extends LitElement {
68
65
return this . _config . number_of_forecasts || 5 ;
69
66
}
70
67
68
+ firstUpdated ( ) {
69
+ HELPERS . then ( help => {
70
+ if ( help . importMoreInfoControl ) {
71
+ help . importMoreInfoControl ( "fan" ) ;
72
+ }
73
+ } )
74
+ }
75
+
71
76
render ( ) {
72
77
if ( ! this . hass ) {
73
78
return html `` ;
You can’t perform that action at this time.
0 commit comments