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

* define success for all branches

* add operation_mode to error when unexpected value

* fix black linting

* black linting

* fix weird black linting result
pull/26166/head
Tyler Page 2019-08-23 01:23:19 -07:00 committed by Franck Nijhof
parent f704a8e90e
commit 432f6569ad
1 changed files with 3 additions and 1 deletions
homeassistant/components/venstar

View File

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