KeyError, when serving include_runtime=True in request_thermostats call
jefwu72 opened this issue · 4 comments
selection = Selection(selection_type=SelectionType.REGISTERED.value, selection_match='', include_runtime=True)
thermostat_response = ecobee_service.request_thermostats(selection)
File "/Users/jwu/PycharmProjects/ecobee/ecobee.py", line 133, in thermostats_summary
thermostat_response = self.ecobee_service.request_thermostats(selection)
File "/Users/jwu/ecobee/lib/python3.5/site-packages/pyecobee/service.py", line 367, in request_thermostats
return EcobeeService.__process_http_response(response, EcobeeThermostatResponse)
File "/Users/jwu/ecobee/lib/python3.5/site-packages/pyecobee/service.py", line 130, in __process_http_response
is_top_level=True)
File "/Users/jwu/ecobee/lib/python3.5/site-packages/pyecobee/utilities.py", line 89, in dictionary_to_object
dictionary_to_object(data[key], property_type, response_properties, parent_classes, indent + 4)
File "/Users/jwu/ecobee/lib/python3.5/site-packages/pyecobee/utilities.py", line 138, in dictionary_to_object
indent + 8)
File "/Users/jwu/ecobee/lib/python3.5/site-packages/pyecobee/utilities.py", line 89, in dictionary_to_object
dictionary_to_object(data[key], property_type, response_properties, parent_classes, indent + 4)
File "/Users/jwu/ecobee/lib/python3.5/site-packages/pyecobee/utilities.py", line 159, in dictionary_to_object
generated_code = '{0}={1!r}'.format(parent_classes[-1].attribute_name_map[key], data[key])
KeyError: 'showIconMode'
I too am getting the same error. Is this software still being actively supported?
@LesFromIL -- I started to use the fork https://github.com/mumblepins/Pyecobee -- appears to work around this issue.
Thanks to you kirussel! It does appear to fix the original issue. Might you have a simple example of using pyecobee? My current program forces me to re-enter a pin every time I run it; a real pain. Certainly there must be a way to re-run the Python program without having to enter a pin on the ecobee site every time.
I've updated the implementation and will try to keep updating it regularly going forward.