Home-Assistant-custom-components-SmartThings-Soundbar icon indicating copy to clipboard operation
Home-Assistant-custom-components-SmartThings-Soundbar copied to clipboard

Samsung MS750

Open znanywawa opened this issue 2 years ago • 1 comments

Hi Piotr,

I have a problem with Samsung MS750. I did installed Your integration via HACS, also I have created completely fresh API token at SmartThings (same API token is used by TIZEN integration for TV and works with no issues) and I have checked does control via mobile app works (and it works).

But still I have an error at HA:

Update for media_player.living_room_soundbar_ms750 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 527, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 722, in async_device_update
    raise exc
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/smartthings_soundbar/media_player.py", line 76, in update
    SoundbarApi.device_update(self)
  File "/config/custom_components/smartthings_soundbar/api.py", line 39, in device_update
    device_source = data['main']['inputSource']['value']
KeyError: 'inputSource'

My config is as below:

- platform: smartthings_soundbar
  name: "Living Room Soundbar MS750"
  api_key: "XXX-YYY-DDD-AAA-BBB"
  device_id: "YYY-XXX-AAA-DDD-BBB"
  max_volume: 100

Both (API key and device ID) are correct and device have ONLINE status at SmartThings: image

Any idea?

znanywawa avatar Dec 13 '22 19:12 znanywawa

same model, and same issue:

2023-08-11 22:51:40.832 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.soundbar fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 699, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 940, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthings_soundbar/media_player.py", line 76, in update SoundbarApi.device_update(self) File "/config/custom_components/smartthings_soundbar/api.py", line 39, in device_update device_source = data['main']['inputSource']['value'] ~~~~~~~~~~~~^^^^^^^^^^^^^^^ KeyError: 'inputSource'

is there something we can do to fix it ?

megosugit avatar Aug 11 '23 20:08 megosugit