From 7f82b90c25ca6b4da87413458d1ff2e3869fc4cf Mon Sep 17 00:00:00 2001 From: Philip Allgaier Date: Wed, 7 Sep 2022 14:27:54 +0200 Subject: [PATCH] Either show range or fix target temperature control in climate more-info (#13638) --- src/dialogs/more-info/controls/more-info-climate.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/dialogs/more-info/controls/more-info-climate.ts b/src/dialogs/more-info/controls/more-info-climate.ts index 2a66080055..1715a94703 100644 --- a/src/dialogs/more-info/controls/more-info-climate.ts +++ b/src/dialogs/more-info/controls/more-info-climate.ts @@ -98,7 +98,9 @@ class MoreInfoClimate extends LitElement { ` : ""} - ${stateObj.attributes.temperature !== undefined && + ${supportTargetTemperature && + !supportTargetTemperatureRange && + stateObj.attributes.temperature !== undefined && stateObj.attributes.temperature !== null ? html` ` : ""} - ${(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`