Prevent errors in more-info-climate if no modes are provided despite support flags (#10694)

This commit is contained in:
Philip Allgaier 2021-11-29 10:03:30 +01:00 committed by GitHub
parent 367322415e
commit 0b7fc177f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,7 +192,7 @@ class MoreInfoClimate extends LitElement {
</div> </div>
</div> </div>
${supportPresetMode ${supportPresetMode && stateObj.attributes.preset_modes
? html` ? html`
<div class="container-preset_modes"> <div class="container-preset_modes">
<ha-paper-dropdown-menu <ha-paper-dropdown-menu
@ -220,7 +220,7 @@ class MoreInfoClimate extends LitElement {
</div> </div>
` `
: ""} : ""}
${supportFanMode ${supportFanMode && stateObj.attributes.fan_modes
? html` ? html`
<div class="container-fan_list"> <div class="container-fan_list">
<ha-paper-dropdown-menu <ha-paper-dropdown-menu
@ -248,7 +248,7 @@ class MoreInfoClimate extends LitElement {
</div> </div>
` `
: ""} : ""}
${supportSwingMode ${supportSwingMode && stateObj.attributes.swing_modes
? html` ? html`
<div class="container-swing_list"> <div class="container-swing_list">
<ha-paper-dropdown-menu <ha-paper-dropdown-menu