diff --git a/docs/lovelace_custom_card.md b/docs/lovelace_custom_card.md index 93579ef8..f5cc73b1 100644 --- a/docs/lovelace_custom_card.md +++ b/docs/lovelace_custom_card.md @@ -70,6 +70,13 @@ class ContentCardExample extends HTMLElement { `; } + setConfig(config) { + if (!config.entity) { + throw new Error('You need to define an entity'); + } + this.config = config; + } + // The height of your card. Home Assistant uses this to automatically // distribute all cards over the available columns. getCardSize() {