Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/panels/lovelace/cards/hui-thermostat-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,18 @@ export class HuiThermostatCard extends hassLocalizeLitMixin(LitElement)
<div id="tooltip">
<div class="title">${computeStateName(stateObj)}</div>
<div class="current-temperature">
Comment thread
schmic marked this conversation as resolved.
<span class="current-temperature-text">${
stateObj.attributes.current_temperature
}
<span class="uom">${
this.hass.config.unit_system.temperature
}</span>
</span>
${
stateObj.attributes.current_temperature
? html`
<span class="current-temperature-text">

@zsarnett zsarnett Nov 5, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take out the surrounding Span of current-temperature-text and only have

${stateObj.attributes.current_temperature}
<span class="uom">
   ${this.hass.config.unit_system.temperature}
</span>

This be the rendered or not rendered part. and then in the else just html``

${stateObj.attributes.current_temperature}
<span class="uom">
${this.hass.config.unit_system.temperature}
</span>
</span>
`
: html`<span class="current-temperature-text"></span>`
}
</div>
<div class="climate-info">
<div id="set-temperature"></div>
Expand Down