PiotrMachowski / Home-Assistant-custom-components-SmartThings-Soundbar

Samsung Smarthings API for controlling Soundbar
MIT License
91 stars 24 forks source link

This entity does not have a unique ID #32

Closed OMVMMG closed 6 months ago

OMVMMG commented 2 years ago

@PiotrMachowski Thank for developing this integration. I'm trying to set it up with a Q900A and I'm getting a "This entity does not have a unique ID" message. Not sure it is related to the integration being manual through YALM or becaus ethe device is not suppourted.

Thanks for any help.

PiotrMachowski commented 2 years ago

This message only means that you can't change entity id/adjust some entity personalization. It doesn't affect functionality

OMVMMG commented 2 years ago

I'm guessing the Q900A is not supported as I can't turn on/off and source list is not displayed.

PiotrMachowski commented 2 years ago

There might be something in logs, can you check it out?

OMVMMG commented 2 years ago

This is what I get:

Update for media_player.sounbar_q900a fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.10/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, 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 34, in device_update
    data = resp.json()
  File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
SparkyBearBomb commented 1 year ago

I have a Q900T, it was working previously but now it is in read-only as the device does not have a unique ID, I have tried adding an entity ID in the yaml but HA gets upset saying entity ID is not supported.

PiotrMachowski commented 1 year ago

@SparkyBearBomb this is not related to missing unique ID, something else must be wrong

piotr-rojek commented 1 year ago

Without unique_id it is not possible to expose the device to any Voice Assistants - would it be possible to set it automatically to the device's "serial number", or at least add a possibility to define it in the configuration file?

ManixQC commented 11 months ago

This would be awesome! I could then control my Q950A which seems to work but has no unique ID. As mentioned above, can't add to Voice Assistants and it gives some more problems.

Please! :D

Edit: Found another custom integration based on this one that appears in HA as a device with more features! I share it here for other people who need it :)

https://github.com/samuelspagl/ha_samsung_soundbar

PiotrMachowski commented 6 months ago

Added in v1.0.3