diff --git a/README.md b/README.md index 66ae1a7..3960c08 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ fold-entity-row Make a group from entities in a lovelace entities card - and fold them away when you don't want to see them. +This card requires [card-tools](https://github.com/thomasloven/lovelace-card-tools) to be installed. + ## Options | Name | Type | Default | Description diff --git a/fold-entity-row.js b/fold-entity-row.js index b710b95..da1a55f 100644 --- a/fold-entity-row.js +++ b/fold-entity-row.js @@ -1,181 +1,126 @@ -class FoldRow extends Polymer.Element { +var LitElement = LitElement || Object.getPrototypeOf(customElements.get('hui-error-entity-row')); +class FoldEntityRow extends LitElement { - static get template() { - return Polymer.html` - -
+ static get properties() { + return { + _closed: Boolean, + }; + } + + render() { + return window.cardTools.litHtml` + ${this._renderStyle()}