From 6d11d3cc65eb9d35c5f64d5c0139cbf5f7ae31c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lov=C3=A9n?= Date: Thu, 24 Jan 2019 10:53:32 +0100 Subject: [PATCH] Update for Home Assistant 0.86 --- README.md | 2 ++ fold-entity-row.js | 28 ++++++++++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) 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()}