diff --git a/README.md b/README.md index 76e2933..7380c6f 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ Make a group from entities in a lovelace entities card - and fold them away when This card requires [card-tools](https://github.com/thomasloven/lovelace-card-tools) to be installed. +For installation instructions [see this guide](https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins). + ## Options | Name | Type | Default | Description diff --git a/fold-entity-row.js b/fold-entity-row.js index d91d2b2..7f500ab 100644 --- a/fold-entity-row.js +++ b/fold-entity-row.js @@ -1,5 +1,5 @@ -var LitElement = LitElement || Object.getPrototypeOf(customElements.get('hui-error-entity-row')); -class FoldEntityRow extends LitElement { +customElements.whenDefined('card-tools').then(() => { +class FoldEntityRow extends cardTools.litElement() { static get properties() { return { @@ -8,7 +8,7 @@ class FoldEntityRow extends LitElement { } render() { - return window.cardTools.litHtml` + return cardTools.litHtml()` ${this._renderStyle()}