B5r1oJ0A9G / teufel_raumfeld

Integration for Teufel smart speaker (aka Raumfeld Multiroom) into https://www.home-assistant.io/.
GNU General Public License v3.0
31 stars 7 forks source link

Speakers temporary offline causes error messages in the log #55

Closed greentux closed 3 months ago

greentux commented 10 months ago

I configured some speakers, but no one has to be temporary offline. This causes error messages in the Log.

KeyError: 'WZ'
2023-12-09 23:25:22.601 ERROR (MainThread) [homeassistant.helpers.entity] Update for media_player.room_wz fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 698, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 959, in async_device_update
    await self.async_update()
  File "/config/custom_components/teufel_raumfeld/media_player.py", line 876, in async_update
    elif self._raumfeld.room_is_spotify_single_room(self._room):
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hassfeld/__init__.py", line 449, in room_is_spotify_single_room
    room_udn = self.resolve["room_to_udn"][room]
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'WZ'
2023-12-09 23:25:26.953 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.connector_wz_2_softwareversion fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 698, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 959, in async_device_update
    await self.async_update()
  File "/config/custom_components/teufel_raumfeld/sensor.py", line 106, in async_update
    self._state = await self._get_state(self._device_udn)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hassfeld/__init__.py", line 1067, in async_get_device_info
    location = self.device_udn_to_location(udn)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hassfeld/__init__.py", line 380, in device_udn_to_location
    device_location = self.resolve["udn_to_devloc"][device_udn]
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^

Any hints, how to handle this?

thx

B5r1oJ0A9G commented 3 months ago

Can you please explain in more detail what is meant by "[...]but no one has to be temporary offline", that is the leading to the problem?

greentux commented 3 months ago

Oh its a long time ago. I think we can close that.

B5r1oJ0A9G commented 3 months ago

All right. Thanks for the quick reply!