mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-28 11:46:42 +00:00
Handle unavailable climate (#3446)
This commit is contained in:
parent
d9628fd9a2
commit
b9afa69ee5
@ -169,7 +169,7 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
: ""}
|
||||
</div>
|
||||
<div class="modes">
|
||||
${stateObj.attributes.hvac_modes
|
||||
${(stateObj.attributes.hvac_modes || [])
|
||||
.concat()
|
||||
.sort(compareClimateHvacModes)
|
||||
.map((modeItem) => this._renderIcon(modeItem, mode))}
|
||||
@ -288,7 +288,11 @@ export class HuiThermostatCard extends LitElement implements LovelaceCard {
|
||||
let sliderValue: string | number | null;
|
||||
let uiValue: string;
|
||||
|
||||
if (
|
||||
if (stateObj.state === "unavailable") {
|
||||
sliderType = "min-range";
|
||||
sliderValue = null;
|
||||
uiValue = this.hass!.localize("state.default.unavailable");
|
||||
} else if (
|
||||
stateObj.attributes.target_temp_low &&
|
||||
stateObj.attributes.target_temp_high
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user