home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.03k stars 28.28k forks source link

Onkyo integration does not allow unique_id with individual configuration #116756

Open Styx85 opened 2 weeks ago

Styx85 commented 2 weeks ago

The problem

As far as I researched, the onkyo integration should already support unique_id. But for my configuration it seems not to be supported with an individual configuration. Or is it working as intended?

What version of Home Assistant Core has the issue?

core-2024.5.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

onkyo

Link to integration documentation on our website

https://www.home-assistant.io/integrations/onkyo/

Diagnostics information

No response

Example YAML snippet

##spills an error
media_player:
  - platform: onkyo
    host: !secret id_onkyo
    name: Onkyo Living room
    unique_id: xxx-2797-yyy-ab48-zzz

## works and creates unique_id
media_player:
  - platform: onkyo
#    host: !secret id_onkyo
#    name: Onkyo Wohnzimmer

Anything in the logs that might be useful for us?

Invalid config for 'onkyo' from integration 'media_player' at configuration.yaml, line 74: 'unique_id' is an invalid option for 'media_player.onkyo', check: unique_id

Additional information

No response

home-assistant[bot] commented 2 weeks ago

onkyo documentation onkyo source

dshokouhi commented 2 weeks ago

You don't define the unique id the integration does. Notice how that is not mentioned in the documentation?

dshokouhi commented 2 weeks ago

Looks like only devices that are discovered by the integration get a unique ID, strange.

https://github.com/home-assistant/core/blob/dev/homeassistant/components/onkyo/media_player.py#L263-L268