I have home assistant running on a synology. I have a handful of z-wave devices connected via SmartThings and the SmartThings integration.
Earlier today, after a restart, SmartThings was just gone. I tried to re-add the integration with a new PAT from SmartThings, and it doesn’t work. After going through the flow and failing to see SmartThings in the integrations, I see this in the logs:
Exception in functools.partial(<function smartapp_update at 0x7ff96ff5a550>, <homeassistant.core.HomeAssistant object at 0x7ff983c249a0>) when dispatching 'smartthings_smartap_UPDATE': (<pysmartapp.update.UpdateRequest object at 0x7ff977e948e0>, <pysmartapp.request.EmptyDataResponse object at 0x7ff972ab7c70>, <pysmartapp.smartapp.SmartApp object at 0x7ff977f57340>) Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 465, in smartapp_update await _continue_flow( File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 408, in _continue_flow flow = next( File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 412, in <genexpr> if flow["handler"] == DOMAIN and flow["context"]["unique_id"] == unique_id KeyError: 'unique_id'
Okay I tracked down this thread which gave me the hass_smartthings_remove tool. Ran that; tried to re-add the integration with a new token. Then I got a UI error that said something to the affect of “unable to complete, please restart home assistant and try again” Logs inexplicably show a 403 error:
Unable to setup configuration entry 'My home' - please reconfigure the integration
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 137, in async_setup_entry
devices = await api.devices(location_ids=[installed_app.location_id])
File "/usr/local/lib/python3.9/site-packages/pysmartthings/smartthings.py", line 87, in devices
resp = await self._service.get_devices(params)
File "/usr/local/lib/python3.9/site-packages/pysmartthings/api.py", line 113, in get_devices
return await self.get_items(API_DEVICES, params=params)
File "/usr/local/lib/python3.9/site-packages/pysmartthings/api.py", line 384, in get_items
resp = await self.request("get", self._api_base + resource, params, None)
File "/usr/local/lib/python3.9/site-packages/pysmartthings/api.py", line 376, in request
resp.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1000, in raise_for_status
raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 403, message='Forbidden', url=URL('https://api.smartthings.com/v1/devices?locationId=4f044c70-2933-4fa8-b3f8-853249f12e46')