SmartThings integration not adding devices

Hello,

SmartThings was up and running until a reboot that made all of the entities unavailable. I usually have luck re-installing the integration. This time, however, it installs but does not add any of my configured devices. I have tried using the removal tool without success. I am using the integration with Nabu Casa. Any help is appreciated! Log below.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 219, in async_setup
    result = await component.async_setup_entry(  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 130, in async_setup_entry
    devices = await api.devices(location_ids=[installed_app.location_id])
  File "/usr/local/lib/python3.8/site-packages/pysmartthings/smartthings.py", line 101, in devices
    return [DeviceEntity(self._service, entity) for entity in resp]
  File "/usr/local/lib/python3.8/site-packages/pysmartthings/smartthings.py", line 101, in <listcomp>
    return [DeviceEntity(self._service, entity) for entity in resp]
  File "/usr/local/lib/python3.8/site-packages/pysmartthings/device.py", line 785, in __init__
    self.apply_data(data)
  File "/usr/local/lib/python3.8/site-packages/pysmartthings/device.py", line 129, in apply_data
    self._type = data["type"]
KeyError: 'type'

Hey @baker I ran into this issue as well. I am using a python install on a Mac, currently MY upgrade is capped at 0.112.5, because of my version of Python I’m using, and apparently there were some updates to the SmartThings component code. To fix this, for now, I added the SmartThings code, from Github directly to my instance as a custom_component.

There’s some information for it here as well:

EDIT: I edited this to be clear that the reason I couldn’t upgrade past 0.112.5 was because of my version of python3.

1 Like