import { LitElement, html, } from 'https://unpkg.com/@polymer/lit-element@^0.5.2/lit-element.js?module'; class MigrateCard extends LitElement { static get properties() { return { hass: Object, config: Object, }; } _render({ hass, config }) { return html`
Add ID's to 'ui-lovelace.yaml'
`; } _migrate(hass) { hass.callWS({ type: "lovelace/config/migrate"}).then( (resp) => { alert("Successfully migrated!"); }, (err) => { alert("Error: " + err.message); console.error('Message failed!', err); } ); } setConfig(config) { this.config = config; } // The height of your card. Home Assistant uses this to automatically // distribute all cards over the available columns. getCardSize() { return 1; } } customElements.define('migrate-card', MigrateCard);