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