Skip to content

Commit

Permalink
#74 Move attribute displays to sensor area (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
junalmeida authored Apr 18, 2023
1 parent 01c698b commit 88344c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minimalistic-area-card",
"version": "1.1.15",
"version": "1.1.16",
"description": "Minimalistic Area Card for Home Assistant",
"keywords": [
"home-assistant",
Expand Down
8 changes: 4 additions & 4 deletions src/minimalistic-area-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class MinimalisticAreaCard extends LitElement {

const entity = this.parseEntity(item);
const [domain, _] = entity.entity.split('.');
if (SENSORS.indexOf(domain) !== -1) {
if (SENSORS.indexOf(domain) !== -1 || entity.attribute) {
this._entitiesSensor.push(entity);
}
else if (
Expand Down Expand Up @@ -267,9 +267,9 @@ class MinimalisticAreaCard extends LitElement {
<div class="state">
${entityConf.attribute
? html`
${entityConf.prefix}${stateObj.attributes[
entityConf.attribute
]}${entityConf.suffix}
${entityConf.prefix}
${stateObj.attributes[entityConf.attribute]}
${entityConf.suffix}
`
: this.computeStateValue(stateObj)}
</div>
Expand Down

0 comments on commit 88344c4

Please sign in to comment.