cleanup editors (#3786)

* cleanup editors

* address review comments
This commit is contained in:
Ian Richardson
2019-09-23 17:11:45 -05:00
committed by GitHub
parent a08884fed6
commit 2cc196e3fb
21 changed files with 490 additions and 207 deletions

View File

@@ -22,13 +22,25 @@ export class HuiEntityEditor extends LitElement {
@property() protected entities?: EntityConfig[];
@property() protected label?: string;
protected render(): TemplateResult | void {
if (!this.entities) {
return html``;
}
return html`
<h3>Entities</h3>
<h3>
${this.label ||
this.hass!.localize(
"ui.panel.lovelace.editor.card.generic.entities"
) +
" (" +
this.hass!.localize(
"ui.panel.lovelace.editor.card.config.required"
) +
")"}
</h3>
<div class="entities">
${this.entities.map((entityConf, index) => {
return html`