Change Listening mode of media player

No. The config is still invalid.

media_player:
  - platform: onkyo
    host: 192.168.0.195
    name: VSX-831
    sources:
      video2: 'HTPC'
      tv: 'TV'
    sound_mode_list:
      - Stereo
      - Direct
      - Surround
      - All channels Stereo
Invalid config for [media_player.onkyo]: [sound_mode_list] is an invalid option for [media_player.onkyo]. 
Check: media_player.onkyo->sound_mode_list. (See ?, line ?).

I also tried sound_modes as param like in the py file. Also no luck.

To start with comment out your sound_mode_list from your yaml and see what the code produces by default.

Also check your logs. I initially mistyped the change to manifest.json. post yours if you want.

Without the source_list HA starts without problems.
The only onkyo related log enries are:

homeassistant    | 2022-03-29 20:16:43 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration onkyo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

homeassistant    | 2022-03-29 20:16:46 WARNING (MainThread) [homeassistant.helpers.entity] Entity media_player.vsx_831 (<class 'custom_components.onkyo.media_player.OnkyoDevice'>) implements device_state_attributes. Please report it to the custom component author.

The manifest.json looks like this:
image

And the attributes of the created media player?

image

image

See post 11 above for what I am asking for, see the states page in dev tools

Sorry, my fault. I was on the (default) core:dev branch and not on the onkyosoundmodes branch.

With the correct branch I got all modes available in the UI :muscle:

1 Like

how are the chances to get it to HACS or even in official plugin?

What is “official plugin”.

Hi, I know this is a separate topic but are you able to check you still have all these attributes for your Onkyo device. After the latest update I have lost all audio information, source information, etc. attributes.
Thanks

Latest is not a version.

I am on 2022.9.0b6 and have everything I would expect.

This works great but if I reboot Home Assistant when the Onkyo receiver is on the integration fails and the device is not available. I checked the logs and it fails in the custom component on line #369 of media_player.py. If I turn the Onkyo receiver off and reboot Home Assistant the integration succeeds and the device is available.

Edit: Here is the error

2022-09-28 19:55:25.419 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.onkyo_tx_nr5100 fails
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/onkyo/media_player.py", line 369, in update
for sound_mode in sound_modes:
TypeError: 'int' object is not iterable

I have Onkyo TX-NR676 and Home assistant 2022.9. I added the files of koying in custom components. The device still doesn’t have any sound modes. How can I add them?
Source, volume can be changed without any problem, but sound modes are not working.

Did you add a version key to manifest.json?

Yes, I added “version”: “1.0” and restarted home assistant.
In developer options, I see supported features: 20364. Does my model support changing sound mode over network call?

I get 85900 for supported features. What did you have before you used the custom_component?

Do you see a reference to the custom component in your logs?

I get supported features: 20364

Do you see a reference to the custom component in your logs?

I don’t know how to check it. In logbook I see the receiver as media_player.onkyo, but I think this is not what you mean

System /logs