Use correct Ecobee fan constants (#34177)

This commit is contained in:
Paulus Schoutsen 2020-04-13 17:55:57 -07:00 committed by GitHub
parent 5a9970e63c
commit dbcc294d67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -556,7 +556,7 @@ class Thermostat(ClimateDevice):
def set_fan_mode(self, fan_mode):
"""Set the fan mode. Valid values are "on" or "auto"."""
if fan_mode.lower() != STATE_ON and fan_mode.lower() != HVAC_MODE_AUTO:
if fan_mode.lower() not in (FAN_ON, FAN_AUTO):
error = "Invalid fan_mode value: Valid values are 'on' or 'auto'"
_LOGGER.error(error)
return