Venstar: define success for all branches of set_temperature() (#26148)

* define success for all branches

* add operation_mode to error when unexpected value

* fix black linting

* black linting

* fix weird black linting result
This commit is contained in:
Tyler Page 2019-08-23 01:23:19 -07:00 committed by Franck Nijhof
parent f704a8e90e
commit 432f6569ad

View File

@ -265,9 +265,11 @@ class VenstarThermostat(ClimateDevice):
elif operation_mode == self._client.MODE_AUTO: elif operation_mode == self._client.MODE_AUTO:
success = self._client.set_setpoints(temp_low, temp_high) success = self._client.set_setpoints(temp_low, temp_high)
else: else:
success = False
_LOGGER.error( _LOGGER.error(
"The thermostat is currently not in a mode " "The thermostat is currently not in a mode "
"that supports target temperature" "that supports target temperature: %s",
operation_mode,
) )
if not success: if not success: