samuelspagl / ha_samsung_soundbar

YASSI (Yet another Samsung Soundbar integration) is a HomeAssistant integration for Samsung Soundbars.
https://ha-samsung-soundbar.vercel.app
MIT License
44 stars 2 forks source link

Error adding Soundbar ("Failed to set up") #33

Closed joeu1998 closed 6 months ago

joeu1998 commented 6 months ago

I'm getting an error when I add the details for my soundbar into the setup dialog prompt.

My soundbar was working perfectly with the original integration from Thierry which I installed this morning - then I found this version, so I fully removed Thierry's integration, restarted HA, installed this one, restarted HA, added the API/device IDs, and now receive an error in the logs, as below:

Logger: homeassistant.config_entries
Source: config_entries.py:575
First occurred: 17:47:20 (1 occurrences)
Last logged: 17:47:20

Error setting up entry samsung_soundbar for samsung_soundbar
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 575, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/samsung_soundbar/__init__.py", line 52, in async_setup_entry
    await soundbar_device.update()
  File "/config/custom_components/samsung_soundbar/api_extension/SoundbarDevice.py", line 52, in update
    await self._update_soundmode()
  File "/config/custom_components/samsung_soundbar/api_extension/SoundbarDevice.py", line 74, in _update_soundmode
    payload = await self.get_execute_status()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/samsung_soundbar/api_extension/SoundbarDevice.py", line 390, in get_execute_status
    return dict["data"]["value"]["payload"]
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Please let me know if you have some suggestions to resolve these errors. The reason I wanted to try this integration, is because every time I would change the volume up or down using Thierry's integration, even though the volume WOULD change on the soundbar, an error was presented in HA which was super annoying in the mobile app specifically where the error message takes up a lot of the screen and the phone vibrates. I was hoping that this wouldn't be the case with this newer integration - but I can't seem to get past these errors.

joeu1998 commented 6 months ago

Please ignore me, I just realised this is identical to #26. Reading through those comments now.

samuelspagl commented 6 months ago

@joeu1998 Don't worry ✌️.

I plan to release the latest beta version this week to master. It also has quite a lot of new features.

The one thing that still sadly persists is the general issue with the SmartThings API.

If you have any question or still facing issues, feel free to hit me up 👍