Fix missing supported_features when only custom presets for ESPHome (#53632)

pull/53638/head
Otto Winter 2021-07-28 21:20:26 +02:00 committed by GitHub
parent 19245a5b63
commit 67ac87e915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -228,9 +228,9 @@ class EsphomeClimateEntity(EsphomeEntity[ClimateInfo, ClimateState], ClimateEnti
features |= SUPPORT_TARGET_TEMPERATURE
if self.preset_modes:
features |= SUPPORT_PRESET_MODE
if self._static_info.supported_fan_modes:
if self.fan_modes:
features |= SUPPORT_FAN_MODE
if self._static_info.supported_swing_modes:
if self.swing_modes:
features |= SUPPORT_SWING_MODE
return features