Either show range or fix target temperature control in climate more-info (#13638)

This commit is contained in:
Philip Allgaier 2022-09-07 14:27:54 +02:00 committed by GitHub
parent 3e9d6ea2c5
commit 7f82b90c25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,9 @@ class MoreInfoClimate extends LitElement {
</div>
`
: ""}
${stateObj.attributes.temperature !== undefined &&
${supportTargetTemperature &&
!supportTargetTemperatureRange &&
stateObj.attributes.temperature !== undefined &&
stateObj.attributes.temperature !== null
? html`
<ha-climate-control
@ -112,10 +114,11 @@ class MoreInfoClimate extends LitElement {
></ha-climate-control>
`
: ""}
${(stateObj.attributes.target_temp_low !== undefined &&
${supportTargetTemperatureRange &&
((stateObj.attributes.target_temp_low !== undefined &&
stateObj.attributes.target_temp_low !== null) ||
(stateObj.attributes.target_temp_high !== undefined &&
stateObj.attributes.target_temp_high !== null)
(stateObj.attributes.target_temp_high !== undefined &&
stateObj.attributes.target_temp_high !== null))
? html`
<ha-climate-control
.hass=${this.hass}