mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 16:26:43 +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>
|
></round-slider>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const currentTemperature = stateObj.attributes.current_temperature
|
const currentTemperature = !isNaN(stateObj.attributes.current_temperature)
|
||||||
? svg`
|
? svg`
|
||||||
<svg viewBox="0 0 40 20">
|
<svg viewBox="0 0 40 20">
|
||||||
<text
|
<text
|
||||||
@ -153,7 +153,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
|||||||
<g>
|
<g>
|
||||||
<text text-anchor="middle" class="set-value">
|
<text text-anchor="middle" class="set-value">
|
||||||
${
|
${
|
||||||
!this._setTemp
|
this._setTemp === undefined || this._setTemp === null
|
||||||
? ""
|
? ""
|
||||||
: Array.isArray(this._setTemp)
|
: Array.isArray(this._setTemp)
|
||||||
? this._stepSize === 1
|
? this._stepSize === 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user