I tried many times to integrate SmartThings under hassio (hassos), but under logs i found some errors like this... some ideas?
Error setting up entry Domov for smartthings
ValueError: 'OCF' is not a valid DeviceType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 192, in async_setup
hass, self
File "/usr/src/homeassistant/homeassistant/components/smartthings/__init__.py", line 116, 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 77, in devices
return [DeviceEntity(self._service, entity) for entity in resp]
File "/usr/local/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 77, in <listcomp>
return [DeviceEntity(self._service, entity) for entity in resp]
File "/usr/local/lib/python3.7/site-packages/pysmartthings/device.py", line 651, in __init__
self.apply_data(data)
File "/usr/local/lib/python3.7/site-packages/pysmartthings/device.py", line 94, in apply_data
self._type = DeviceType(data['type'])
File "/usr/local/lib/python3.7/enum.py", line 310, in __call__
return cls.__new__(cls, value)
File "/usr/local/lib/python3.7/enum.py", line 564, in __new__
raise exc
File "/usr/local/lib/python3.7/enum.py", line 548, in __new__
result = cls._missing_(value)
File "/usr/local/lib/python3.7/enum.py", line 577, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 'OCF' is not a valid DeviceType
Hey there @andrewsayre, mind taking a look at this issue as its been labeled with a integration (smartthings) you are listed as a codeowner for? Thanks!
I'd had a similar issue after adding a new Samsung TV to Smartthings when I updated HA (I'm running on Docker) I got the same issue. I just logged into the Samsung Graph API and remove the TV and it worked ok again. I suspect it was the DeviceType (which was set to undefined on the API) I haven't tried readding as yet
I'd had a similar issue after adding a new Samsung TV to Smartthings when I updated HA (I'm running on Docker) I got the same issue. I just logged into the Samsung Graph API and remove the TV and it worked ok again. I suspect it was the DeviceType (which was set to undefined on the API) I haven't tried readding as yet
hmm. sounds familiar... i added new SamsungTV to smart things app too. when tv was removed, other devices are again listed.
It looks like the API changed in how it represents OCF devices. I'll update the library and submit a PR today to address this. Sorry for the delay folks!
Hit this today with DeviceType “HUB”. Updated to 0.104.3 and it went away. Thanks @andrewsayre
Hit this today with DeviceType “HUB”. Updated to 0.104.3 and it went away. Thanks @andrewsayre
Same here, sorted the problem quickly.
I am having the same issue and I am running 0.105.3:
2020-02-12 11:42:39 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Home for smartthings
ValueError: 'HUB' is not a valid DeviceType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/config_entries.py", line 190, in async_setup
hass, self
File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/smartthings/__init__.py", line 116, in async_setup_entry
devices = await api.devices(location_ids=[installed_app.location_id])
File "/srv/homeassistant/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 77, in devices
return [DeviceEntity(self._service, entity) for entity in resp]
File "/srv/homeassistant/lib/python3.7/site-packages/pysmartthings/smartthings.py", line 77, in
return [DeviceEntity(self._service, entity) for entity in resp]
File "/srv/homeassistant/lib/python3.7/site-packages/pysmartthings/device.py", line 651, in __init__
self.apply_data(data)
File "/srv/homeassistant/lib/python3.7/site-packages/pysmartthings/device.py", line 94, in apply_data
self._type = DeviceType(data['type'])
File "/usr/lib/python3.7/enum.py", line 310, in __call__
return cls.__new__(cls, value)
File "/usr/lib/python3.7/enum.py", line 564, in __new__
raise exc
File "/usr/lib/python3.7/enum.py", line 548, in __new__
result = cls._missing_(value)
File "/usr/lib/python3.7/enum.py", line 577, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 'HUB' is not a valid DeviceType
I have removed the integrations, applied a new token, even ran the hass_smarthings_remove
^^^
bump
it would appear that the normal command was not not updating home assistant:
pip3 install --upgrade homeassistant
I have it all working now but had to issue the following:
sudo hassbian-config upgrade homeassistant
Most helpful comment
Hit this today with DeviceType “HUB”. Updated to 0.104.3 and it went away. Thanks @andrewsayre