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
73.43k stars 30.66k forks source link

LinkPlay integration doesn't create any devices or entities on 24.9.0 #125283

Closed stibbzy closed 2 months ago

stibbzy commented 2 months ago

The problem

After updating to Home Assistant Core 24.9.0, LinkPlay Wiim Mini devices are now auto-detected after this merge: https://github.com/home-assistant/core/pull/124307 However, after selecting 'Configure', the integration doesn't create any devices or entities for the detected unit: Linkplay

The logs show this error:

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?

24.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

No response

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)

skitchbeatz commented 2 months ago

Same issue here with 5 wiim pros. Endpoints are found and successfully setup but no devices or entities.

whalleyms commented 2 months ago

Same behavior and log message here with WiiM pro & amp

trajux commented 2 months ago

Same here with 2x WiiM Mini's and 1x WiiM Pro Plus devices.

ovijitpaul1 commented 2 months ago

Same here for WiiM Amp. Looks like PlayingMode not in SOURCE_MAP.

andreaalloway commented 2 months ago

Same here with 2x WiiM Pro devices

bencoldham commented 2 months ago

same issue here :(

1x wiim pro

dmutsaers commented 2 months ago

Add me to the list of users with missing WiiM Pro devices.

stibbzy commented 2 months ago

Same here for WiiM Amp. Looks like PlayingMode not in SOURCE_MAP.

Maybe it needs to include 'SLAVE'? : https://github.com/n4archive/LinkPlayAPI/blob/master/api.md

greggotcher commented 1 month ago

I have the same problem with the wiim mini I just bought

corgana commented 1 month ago

My HA updated, and linkplay does not recognize anything now. Attempting to add manually just gives "Unknown error occurred" (with no delay).

skitchbeatz commented 1 month ago

My HA updated, and linkplay does not recognize anything now. Attempting to add manually just gives "Unknown error occurred" (with no delay).

If you remove the older linkplay HACS integration and references to your devices in your configuration.yaml, then restart HA the included linkplay integration should pick up those devices. This issue has been fixed with the latest version of HA 2024.9.1

corgana commented 1 month ago

Thanks for the reply, but I do not have the older HACS integration or any entries in my configuration.yaml.

EDIT: Wiim had a firmware update and now HA appears to be recognizing it.