From 432f6569ad9bbd545180afc0283ac0b674f8a755 Mon Sep 17 00:00:00 2001 From: Tyler Page Date: Fri, 23 Aug 2019 01:23:19 -0700 Subject: [PATCH] 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 --- homeassistant/components/venstar/climate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/venstar/climate.py b/homeassistant/components/venstar/climate.py index e75ee2387ee..7e1ae1ecd60 100644 --- a/homeassistant/components/venstar/climate.py +++ b/homeassistant/components/venstar/climate.py @@ -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: