Skip to content

Commit

Permalink
Check for null target_temp (#4842)
Browse files Browse the repository at this point in the history
Fixes #4359
  • Loading branch information
bramkragten committed Feb 12, 2020
1 parent 4cdc476 commit c5aa000
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/dialogs/more-info/controls/more-info-climate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ class MoreInfoClimate extends LitElement {
</div>
`
: ""}
${stateObj.attributes.temperature !== undefined
${stateObj.attributes.temperature !== undefined &&
stateObj.attributes.temperature !== null
? html`
<ha-climate-control
.value=${stateObj.attributes.temperature}
Expand All @@ -112,8 +113,10 @@ class MoreInfoClimate extends LitElement {
></ha-climate-control>
`
: ""}
${stateObj.attributes.target_temp_low !== undefined ||
stateObj.attributes.target_temp_high !== undefined
${(stateObj.attributes.target_temp_low !== undefined &&
stateObj.attributes.target_temp_low !== null) ||
(stateObj.attributes.target_temp_high !== undefined &&
stateObj.attributes.target_temp_high !== null)
? html`
<ha-climate-control
.value=${stateObj.attributes.target_temp_low}
Expand Down

0 comments on commit c5aa000

Please sign in to comment.