I had to redo the SmartThings integration and cannot getting it to work.
Deleted the database, devices file, ran the removal app successfully. It does add the integration but I get the following error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 217, in async_setup
hass, self
File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 127, in async_setup_entry
devices = await api.devices(location_ids=[installed_app.location_id])
File "/usr/local/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 88, in devices
return [DeviceEntity(self._service, entity) for entity in resp]
File "/usr/local/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 88, in <listcomp>
return [DeviceEntity(self._service, entity) for entity in resp]
File "/usr/local/lib/python3.7/site-packages/pysmartthings/device.py", line 656, in __init__
self.apply_data(data)
File "/usr/local/lib/python3.7/site-packages/pysmartthings/device.py", line 93, in apply_data
self._type = data["type"]
KeyError: 'type'
The smartthings devices do not get added to the environment. Any ideas would be appreciated
Follow-up: @Michael_Azzopardi I reverted from my Docker setup as I’m running it on a Mac and I don’t have the needed network access in Docker.
Since PIP isn’t allowing me to install past 0.112.5 I went to Github and grabbed the component code for SmartThings and added it to “custom_components” for my instance and reran it. Once I did this everything came back online.
Hi, I’m having this same issue but I don’t understand how you went about working around it. Could you explain how and what you did for a newbie whose new to both Home Assistant and programming as a whole?
You’ll need to download the source code for Home Assistant core to get the component. Most likely the easiest way to do this is to go to the following URL and click the green “Code” button and select “Download Zip”. https://github.com/home-assistant/core
Once this is downloaded unzip the code then navigate to the components folder. The path will be like homeassistant -> components -> smartthings
Keep this folder open and then open the configurations folder for Home Assistant, this is the root folder for where the configurations are (you'll know you're in the correct folder if you see your configuration.yaml file). Once there create a new folder called custom_components.
Now copy the smartthings folder, from the Home Assistant code you downloaded earlier, into the custom_components folder. You should see the smartthings folder inside of the custom_components folder now.
Once you’ve done this you should be able to restart your Home Assistant instance and you should now be using the code that you downloaded.
An important note: This is a band-aid solution and every time you update, in the future, you’ll want to remove (a rename might work) this folder to test if the problem was solved in the update. The MAJOR problem with solution is that it overrides the built-in component with the code you have locally, and unless you plan on downloading the code with future updates then you’ll not get the latest updates.
Thank you so much for your incredibly detailed response! However I guess I just got lucky as when I launched the Home Assistant web interface, I saw that there was a core update and after installing it, my smartthings devices showed up!