Fix nexia thermostats humidify without dehumidify support (#52758)

This commit is contained in:
J. Nick Koston 2021-07-12 09:39:51 -10:00 committed by GitHub
parent ee52706f03
commit e6ea9f4708
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -687,6 +687,7 @@ omit =
homeassistant/components/netgear_lte/*
homeassistant/components/netio/switch.py
homeassistant/components/neurio_energy/sensor.py
homeassistant/components/nexia/climate.py
homeassistant/components/nextcloud/*
homeassistant/components/nfandroidtv/notify.py
homeassistant/components/niko_home_control/light.py

View file

@ -203,7 +203,10 @@ class NexiaZone(NexiaThermostatZoneEntity, ClimateEntity):
def set_humidity(self, humidity):
"""Dehumidify target."""
self._thermostat.set_dehumidify_setpoint(humidity / 100.0)
if self._thermostat.has_dehumidify_support():
self._thermostat.set_dehumidify_setpoint(humidity / 100.0)
else:
self._thermostat.set_humidify_setpoint(humidity / 100.0)
self._signal_thermostat_update()
@property