mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
🐛 fix display of current/set temperature when 0 (#4498)
* 🐛 fix display of current/set temperature when 0 * 👌 nullish coalescing
This commit is contained in:
parent
8c49e3c4ef
commit
fbe4550c78
@ -129,7 +129,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
></round-slider>
|
||||
`;
|
||||
|
||||
const currentTemperature = stateObj.attributes.current_temperature
|
||||
const currentTemperature = !isNaN(stateObj.attributes.current_temperature)
|
||||
? svg`
|
||||
<svg viewBox="0 0 40 20">
|
||||
<text
|
||||
@ -153,7 +153,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
<g>
|
||||
<text text-anchor="middle" class="set-value">
|
||||
${
|
||||
!this._setTemp
|
||||
this._setTemp === undefined || this._setTemp === null
|
||||
? ""
|
||||
: Array.isArray(this._setTemp)
|
||||
? this._stepSize === 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user