Added setConfig to make example work (#50)

This commit is contained in:
Marius 2018-07-03 17:47:51 +03:00 committed by Paulus Schoutsen
parent 36a01de7d1
commit b77148e246

View File

@ -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() {