diff --git a/dist/weather-card-editor.js b/dist/weather-card-editor.js index e3d14216..468882bc 100644 --- a/dist/weather-card-editor.js +++ b/dist/weather-card-editor.js @@ -4,7 +4,7 @@ const fireEvent = (node, type, detail, options) => { const event = new Event(type, { bubbles: options.bubbles === undefined ? true : options.bubbles, cancelable: Boolean(options.cancelable), - composed: options.composed === undefined ? true : options.composed, + composed: options.composed === undefined ? true : options.composed }); event.detail = detail; node.dispatchEvent(event); @@ -24,7 +24,7 @@ const css = LitElement.prototype.css; export class WeatherCardEditor extends LitElement { setConfig(config) { - this._config = config; + this._config = { ...config }; } static get properties() { @@ -61,7 +61,7 @@ export class WeatherCardEditor extends LitElement { } const entities = Object.keys(this.hass.states).filter( - (eid) => eid.substr(0, eid.indexOf(".")) === "weather" + eid => eid.substr(0, eid.indexOf(".")) === "weather" ); return html` @@ -100,7 +100,7 @@ export class WeatherCardEditor extends LitElement { slot="dropdown-content" .selected="${entities.indexOf(this._entity)}" > - ${entities.map((entity) => { + ${entities.map(entity => { return html` ${entity} `; @@ -146,7 +146,7 @@ export class WeatherCardEditor extends LitElement { this._config = { ...this._config, [target.configValue]: - target.checked !== undefined ? target.checked : target.value, + target.checked !== undefined ? target.checked : target.value }; } } diff --git a/dist/weather-card.js b/dist/weather-card.js index 66217f21..40fe2a62 100644 --- a/dist/weather-card.js +++ b/dist/weather-card.js @@ -1,5 +1,6 @@ const LitElement = Object.getPrototypeOf(customElements.get("hui-view")); const html = LitElement.prototype.html; +const css = LitElement.prototype.css; const weatherIconsDay = { clear: "day", @@ -133,7 +134,6 @@ class WeatherCard extends LitElement { } return html` - ${this.renderStyle()} ${this._config.current !== false ? this.renderCurrent(stateObj) : ""} ${this._config.details !== false ? this.renderDetails(stateObj) : ""} @@ -251,9 +251,7 @@ class WeatherCard extends LitElement {
${daily.temperature}${this.getUnit("temperature")} @@ -315,8 +313,8 @@ class WeatherCard extends LitElement { return 3; } - renderStyle() { - return html` + static get styles() { + return css`