diff --git a/src/panels/lovelace/components/hui-generic-entity-row.js b/src/panels/lovelace/components/hui-generic-entity-row.js index 445ceaf311..a2060148b0 100644 --- a/src/panels/lovelace/components/hui-generic-entity-row.js +++ b/src/panels/lovelace/components/hui-generic-entity-row.js @@ -9,6 +9,24 @@ import computeStateName from '../../../common/entity/compute_state_name.js'; class HuiGenericEntityRow extends PolymerElement { static get template() { + return html` + ${this.styleTemplate} + + + `; + } + + static get styleTemplate() { return html` - - + `; + } + + static get stateBadgeTemplate() { + return html` + + `; + } + + static get infoTemplate() { + return html` +
+ [[_computeName(config.name, _stateObj)]] + +
`; } diff --git a/src/panels/lovelace/entity-rows/hui-climate-entity-row.js b/src/panels/lovelace/entity-rows/hui-climate-entity-row.js index 079c7d33bd..0af95b7974 100644 --- a/src/panels/lovelace/entity-rows/hui-climate-entity-row.js +++ b/src/panels/lovelace/entity-rows/hui-climate-entity-row.js @@ -6,21 +6,33 @@ import '../components/hui-generic-entity-row.js'; class HuiClimateEntityRow extends PolymerElement { static get template() { + return html` + ${this.styleTemplate} + + ${this.climateControlTemplate} + + `; + } + + static get styleTemplate() { return html` - - - + state-obj="[[_stateObj]]" + > `; } diff --git a/src/panels/lovelace/entity-rows/hui-cover-entity-row.js b/src/panels/lovelace/entity-rows/hui-cover-entity-row.js index 435f34a215..cc8a62edd3 100644 --- a/src/panels/lovelace/entity-rows/hui-cover-entity-row.js +++ b/src/panels/lovelace/entity-rows/hui-cover-entity-row.js @@ -8,6 +8,18 @@ import CoverEntity from '../../../util/cover-model.js'; class HuiCoverEntityRow extends PolymerElement { static get template() { + return html` + ${this.styleTemplate} + + ${this.coverControlTemplate} + + `; + } + + static get styleTemplate() { return html` - - - - + `; + } + + static get coverControlTemplate() { + return html` + + `; } diff --git a/src/panels/lovelace/entity-rows/hui-group-entity-row.js b/src/panels/lovelace/entity-rows/hui-group-entity-row.js index 6dc6386ebe..900c5a53f2 100644 --- a/src/panels/lovelace/entity-rows/hui-group-entity-row.js +++ b/src/panels/lovelace/entity-rows/hui-group-entity-row.js @@ -18,21 +18,27 @@ class HuiGroupEntityRow extends LocalizeMixin(PolymerElement) { hass="[[hass]]" config="[[_config]]" > - - + ${this.groupControlTemplate} `; } + static get groupControlTemplate() { + return html` + + + `; + } + static get properties() { return { hass: Object, diff --git a/src/panels/lovelace/entity-rows/hui-input-number-entity-row.js b/src/panels/lovelace/entity-rows/hui-input-number-entity-row.js index 0aef748f0f..17a0de2801 100644 --- a/src/panels/lovelace/entity-rows/hui-input-number-entity-row.js +++ b/src/panels/lovelace/entity-rows/hui-input-number-entity-row.js @@ -9,6 +9,19 @@ import '../components/hui-generic-entity-row.js'; class HuiInputNumberEntityRow extends mixinBehaviors([IronResizableBehavior], PolymerElement) { static get template() { + return html` + ${this.styleTemplate} + + ${this.inputNumberControlTemplate} + + `; + } + + static get styleTemplate() { return html` - -
- - + +
`; } diff --git a/src/panels/lovelace/entity-rows/hui-input-select-entity-row.js b/src/panels/lovelace/entity-rows/hui-input-select-entity-row.js index ca98eb40d3..5e592523bf 100644 --- a/src/panels/lovelace/entity-rows/hui-input-select-entity-row.js +++ b/src/panels/lovelace/entity-rows/hui-input-select-entity-row.js @@ -16,21 +16,7 @@ import EventsMixin from '../../../mixins/events-mixin.js'; class HuiInputSelectEntityRow extends EventsMixin(PolymerElement) { static get template() { return html` - + ${this.styleTemplate}