diff --git a/homeassistant/components/climate/eq3btsmart.py b/homeassistant/components/climate/eq3btsmart.py index 4a402887864..cbfb35d06e5 100644 --- a/homeassistant/components/climate/eq3btsmart.py +++ b/homeassistant/components/climate/eq3btsmart.py @@ -75,6 +75,8 @@ class EQ3BTSmartThermostat(ClimateDevice): self._name = _name self._thermostat = eq3.Thermostat(_mac) + self._target_temperature = None + self._target_mode = None @property def supported_features(self): @@ -116,6 +118,7 @@ class EQ3BTSmartThermostat(ClimateDevice): temperature = kwargs.get(ATTR_TEMPERATURE) if temperature is None: return + self._target_temperature = temperature self._thermostat.target_temperature = temperature @property @@ -132,6 +135,7 @@ class EQ3BTSmartThermostat(ClimateDevice): def set_operation_mode(self, operation_mode): """Set operation mode.""" + self._target_mode = operation_mode self._thermostat.mode = self.reverse_modes[operation_mode] def turn_away_mode_off(self): @@ -177,3 +181,15 @@ class EQ3BTSmartThermostat(ClimateDevice): self._thermostat.update() except BTLEException as ex: _LOGGER.warning("Updating the state failed: %s", ex) + + if (self._target_temperature and + self._thermostat.target_temperature + != self._target_temperature): + self.set_temperature(temperature=self._target_temperature) + else: + self._target_temperature = None + if (self._target_mode and + self.modes[self._thermostat.mode] != self._target_mode): + self.set_operation_mode(operation_mode=self._target_mode) + else: + self._target_mode = None