kongo09 / hass-onkyo-ng

Better support for Onkyo devices in Home Assistant
Apache License 2.0
7 stars 2 forks source link

Unable to set up a TX-NR727 #20

Open mhoogenbosch opened 4 months ago

mhoogenbosch commented 4 months ago

It adds the device when I enter an optional name, but it doesn't create devices.

The error:

Logger: homeassistant.components.media_player
Bron: helpers/entity_platform.py:356
integratie: Mediaspeler (documentatie, problemen)
Eerst voorgekomen: 09:53:32 (1 gebeurtenissen)
Laatst gelogd: 09:53:32

Error while setting up hass_onkyo_ng platform for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/hass_onkyo_ng/media_player.py", line 90, in async_setup_entry
    entities.append(OnkyoMediaPlayer(coordinator, zone))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_onkyo_ng/media_player.py", line 104, in __init__
    super().__init__(coordinator)
  File "/config/custom_components/hass_onkyo_ng/__init__.py", line 130, in __init__
    self._identifier = coordinator.data[ATTR_IDENTIFIER]
                       ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
KeyError: 'identifier'

This is with debug log turned on.

If there is anything I can help with, please let me know.

mhoogenbosch commented 4 months ago

With the latest beta the error has changed a bit:

Logger: homeassistant.config_entries
Bron: config_entries.py:594
Eerst voorgekomen: 17:41:43 (1 gebeurtenissen)
Laatst gelogd: 17:41:43

Error setting up entry onkyo for hass_onkyo_ng
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_onkyo_ng/__init__.py", line 41, in async_setup_entry
    receiver_info = await onkyo_receiver.get_receiver_info()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_onkyo_ng/onkyo.py", line 189, in get_receiver_info
    await self.get_all_receiver_info()
  File "/config/custom_components/hass_onkyo_ng/onkyo.py", line 186, in get_all_receiver_info
    self._receiver_info = OnkyoReceiver.ReceiverInfo.default(udp_info['model_name'], udp_info['identifier'])
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hass_onkyo_ng/onkyo.py", line 112, in default
    receiver_source.id = int(source_id, 16)
                         ^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 16: '“26”'