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
74.03k stars 31.06k forks source link

Linkplay missing device entities #125328

Closed jelknab closed 2 months ago

jelknab commented 2 months ago

The problem

I was very excited for the recent update adding https support, hoping this would allow the wiim pro plus to be able to connect. However it does not (yet) seem to work for me. The device is now recognized and added as a "hub", but contains no devices or entities.

image

I have a snippet from the logs when removing and adding the device.

Logger: homeassistant.components.media_player
Source: helpers/entity_platform.py:361
integration: Media player ([documentation](https://www.home-assistant.io/integrations/media_player), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+media_player%22))
First occurred: 12:07:02 (5 occurrences)
Last logged: 12:27:49

Error while setting up linkplay platform for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/src/homeassistant/homeassistant/components/linkplay/media_player.py", line 116, in async_setup_entry
    async_add_entities([LinkPlayMediaPlayerEntity(entry.runtime_data.bridge)])
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/linkplay/media_player.py", line 151, in __init__
    SOURCE_MAP[playing_mode] for playing_mode in bridge.device.playmode_support
    ~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: <PlayingMode.FOLLOWER: '99'>

What version of Home Assistant Core has the issue?

core-2024.9.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

LinkPlay

Link to integration documentation on our website

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

Diagnostics information

home-assistant_linkplay_2024-09-05T10-31-24.923Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @velleman, mind taking a look at this issue as it has been labeled with an integration (linkplay) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `linkplay` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign linkplay` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


linkplay documentation linkplay source (message by IssueLinks)

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (media_player) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `media_player` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign media_player` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


media_player documentation media_player source (message by IssueLinks)

saltinesurfer commented 2 months ago

Exact same issue here:

Source: helpers/entity_platform.py:361
integration: Media Player (documentation, issues)
First occurred: 13:14:41 (3 occurrences)
Last logged: 13:52:47

Error while setting up linkplay platform for media_player
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/usr/src/homeassistant/homeassistant/components/linkplay/media_player.py", line 116, in async_setup_entry
    async_add_entities([LinkPlayMediaPlayerEntity(entry.runtime_data.bridge)])
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/linkplay/media_player.py", line 151, in __init__
    SOURCE_MAP[playing_mode] for playing_mode in bridge.device.playmode_support
    ~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: <PlayingMode.FOLLOWER: '99'>
silamon commented 2 months ago

Fix is scheduled to be in 2024.9.1. See #125283