Skip to content

Adjustments to media browser resolve media for HA 2022.6#103

Merged
marcelveldt merged 12 commits intomainfrom
contextvar-support
May 31, 2022
Merged

Adjustments to media browser resolve media for HA 2022.6#103
marcelveldt merged 12 commits intomainfrom
contextvar-support

Conversation

@marcelveldt
Copy link
Copy Markdown
Member

@marcelveldt marcelveldt commented May 9, 2022

remove the workaround to intercept the play_media request from the media browser now that an official solution has been implemented in HA core. We now receive the player id along with the browse media call so we can resolve the correct queue (= media player entity) directly.

)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.service import async_get_current_entity
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will require a newer version of HA so you need to signal that to HACS. Maybe merge it when beta is out ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, leave it here as draft PR until new HA version is released which includes this new helper.

and use final implementation instead where we receive the entity id that requested the browse media
@marcelveldt marcelveldt changed the title Add contextvar support Adjustments to media browser resolve media for HA 2022.6 May 30, 2022
@marcelveldt marcelveldt marked this pull request as ready for review May 31, 2022 18:15
@marcelveldt marcelveldt merged commit 53a1d2d into main May 31, 2022
@marcelveldt marcelveldt deleted the contextvar-support branch May 31, 2022 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants