mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
humidifier card: fix humidity not visible (#14575)
This commit is contained in:
parent
363092ff03
commit
50cc8594be
@ -93,6 +93,8 @@ export class HuiHumidifierCard extends LitElement implements LovelaceCard {
|
|||||||
? stateObj.attributes.humidity
|
? stateObj.attributes.humidity
|
||||||
: stateObj.attributes.min_humidity;
|
: stateObj.attributes.min_humidity;
|
||||||
|
|
||||||
|
const setHumidity = this._setHum ? this._setHum : targetHumidity;
|
||||||
|
|
||||||
const rtlDirection = computeRTLDirection(this.hass);
|
const rtlDirection = computeRTLDirection(this.hass);
|
||||||
|
|
||||||
const slider = UNAVAILABLE_STATES.includes(stateObj.state)
|
const slider = UNAVAILABLE_STATES.includes(stateObj.state)
|
||||||
@ -114,11 +116,11 @@ export class HuiHumidifierCard extends LitElement implements LovelaceCard {
|
|||||||
<svg viewBox="0 0 24 20">
|
<svg viewBox="0 0 24 20">
|
||||||
<text x="50%" dx="1" y="73%" text-anchor="middle" id="set-values">
|
<text x="50%" dx="1" y="73%" text-anchor="middle" id="set-values">
|
||||||
${UNAVAILABLE_STATES.includes(stateObj.state) ||
|
${UNAVAILABLE_STATES.includes(stateObj.state) ||
|
||||||
this._setHum === undefined ||
|
setHumidity === undefined ||
|
||||||
this._setHum === null
|
setHumidity === null
|
||||||
? ""
|
? ""
|
||||||
: svg`
|
: svg`
|
||||||
${this._setHum.toFixed()}
|
${setHumidity.toFixed()}
|
||||||
<tspan dx="-3" dy="-6.5" style="font-size: 4px;">
|
<tspan dx="-3" dy="-6.5" style="font-size: 4px;">
|
||||||
%
|
%
|
||||||
</tspan>
|
</tspan>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user