Error: Task exception was never retrieved

After sending a few service calls to climate.set_temperature I’m getting an error in my HA logs.

Here’s the error:
Log Details (ERROR)

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/”, line 226, in _handle_service_platform_call
await func(entity, data)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/”, line 572, in async_service_temperature_set
await entity.async_set_temperature(**kwargs)
File “/usr/local/lib/python3.6/concurrent/futures/”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/”, line 219, in set_temperature = temp
File “/usr/local/lib/python3.6/site-packages/nest/”, line 578, in target
self._set(‘devices/thermostats’, data)
File “/usr/local/lib/python3.6/site-packages/nest/”, line 206, in _set
response = self._nest_api._put(path=path, data=data)
File “/usr/local/lib/python3.6/site-packages/nest/”, line 1865, in _put
return self._request(‘PUT’, path, data=data)
File “/usr/local/lib/python3.6/site-packages/nest/”, line 1853, in _request
File “/usr/local/lib/python3.6/site-packages/nest/”, line 1696, in _handle_ratelimit
retry_after = response.headers[‘Retry-After’]
File “/usr/local/lib/python3.6/site-packages/requests/”, line 52, in getitem
return self._store[key.lower()][1]
KeyError: ‘retry-after’

This basically bricks my Nest thermostat within HA until I restart HA. Physical Nest still works.

After a few minutes the log updates with:

Log Details (WARNING)

Haven’t received data from Nest in 5 mintues

This has happened both through testing a script that increments the temperature setpoint and within the more-info dialogue when I click on the climate entity. Happens after changing the temperature about 5 times in a row. And has happened after multiple restarts. Since it is also within the climate component I believe I can rule out my script but I’ll post it here anyways.

alias: Temperature Up

  • service: climate.set_temperature
    entity_id: climate.family_room
    temperature: “{{ states.climate.family_room.attributes.temperature + 0.5 }}”

Using latest version of HA (82.0) and 3rd Gen Nest thermostat.