Use _attr_supported_features in nexia climate (#82218)

pull/82222/head
epenet 2022-11-16 20:47:58 +01:00 committed by GitHub
parent a6ff8c5fb3
commit ba546e1072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -166,12 +166,11 @@ class NexiaZone(NexiaThermostatZoneEntity, ClimateEntity):
self._has_emergency_heat = self._thermostat.has_emergency_heat()
self._has_humidify_support = self._thermostat.has_humidify_support()
self._has_dehumidify_support = self._thermostat.has_dehumidify_support()
supported = NEXIA_SUPPORTED
self._attr_supported_features = NEXIA_SUPPORTED
if self._has_humidify_support or self._has_dehumidify_support:
supported |= ClimateEntityFeature.TARGET_HUMIDITY
self._attr_supported_features |= ClimateEntityFeature.TARGET_HUMIDITY
if self._has_emergency_heat:
supported |= ClimateEntityFeature.AUX_HEAT
self._attr_supported_features = supported
self._attr_supported_features |= ClimateEntityFeature.AUX_HEAT
self._attr_preset_modes = self._zone.get_presets()
self._attr_fan_modes = self._thermostat.get_fan_modes()
self._attr_hvac_modes = HVAC_MODES