Skip to content

Commit 9f0e098

Browse files
committed
Only show first row if necessary
1 parent cf4ecd5 commit 9f0e098

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

src/roku-card.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,20 @@ export class RokuCard extends LitElement {
6767
return html`
6868
<ha-card .header="${this._config.name}">
6969
<div class="remote">
70-
<div class="row">
71-
${stateObj?.attributes?.app_name
72-
? html`
73-
<div class="app">${stateObj.attributes.app_name}</div>
74-
`
75-
: ''}
76-
${this._config.tv || (this._config.power && this._config.power.show)
77-
? this._renderButton('power', 'mdi:power', 'Power')
78-
: ''}
79-
</div>
70+
${stateObj?.attributes?.app_name || this._config.tv || (this._config.power && this._config.power.show)
71+
? html`
72+
<div class="row">
73+
${stateObj?.attributes?.app_name
74+
? html`
75+
<div class="app">${stateObj.attributes.app_name}</div>
76+
`
77+
: ''}
78+
${this._config.tv || (this._config.power && this._config.power.show)
79+
? this._renderButton('power', 'mdi:power', 'Power')
80+
: ''}
81+
</div>
82+
`
83+
: ''}
8084
${(this._config.back && this._config.back.show !== false) ||
8185
(this._config.info && this._config.info.show !== false) ||
8286
(this._config.home && this._config.home.show !== false)

0 commit comments

Comments
 (0)