Open apetrycki opened 5 years ago
I'm guessing the Emergency Heat changed from when it was first implemented. I hacked around the issue by doing:
def system_mode(self, mode): try: mode_index = SYSTEM_MODES.index(mode) except ValueError: raise SomeComfortError('Invalid system mode `%s`' % mode) if mode == 'emheat': key = 'SwitchEmergencyHeatAllowed' else: key = 'Switch%sAllowed' % mode.title() try: if not self._data['uiData'][key]: raise SomeComfortError('Device does not support %s' % mode) except KeyError: raise APIError( 'Unknown Key: %s' % key) self._client._set_thermostat_settings( self.deviceid, {'SystemSwitch': mode_index}) self._data['uiData']['SystemSwitchPosition'] = mode_index
in client.py
It isn't pretty, but it maintains backwards compatibility.
I'm guessing the Emergency Heat changed from when it was first implemented. I hacked around the issue by doing:
in client.py
It isn't pretty, but it maintains backwards compatibility.