Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Functionality of ESPHome Media Player #122799

Draft
wants to merge 38 commits into
base: dev
Choose a base branch
from

Conversation

rwrozelle
Copy link

@rwrozelle rwrozelle commented Jul 29, 2024

Breaking change

No breaking change

Proposed change

What does this implement/fix?

Lays the ground work for child components of Esphome Media Player to be built with a richer set of capability.

Description

Extends Esphome Media Player component to support the following commands in child components:

  • Next Track
  • Previous Track
  • Turn On
  • Turn Off
  • Clear Playlist
  • Shuffle
  • Unshuffle
  • Repeat Off
  • Repeat One
  • Repeat All
  • Join
  • Unjoin

Traits are extended to include:

  • supports next/previous track
  • supports turn off/on
  • supports grouping

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Requires the following pull requests:
esphome/esphome-docs#4090
esphome/aioesphomeapi#911
esphome/esphome#7158

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:
Nothing changes for existing esphome media_players, new functionality requires updated/new esphome components.
An example of which is my external component https://github.com/rwrozelle/audio-media-player

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

bobrozelle and others added 25 commits May 18, 2024 08:28
The ESP Media_Player needs optional supports for Next/Previous Track and Turn Off/On.  That way a subclass of Media_Player can use these options to have the Media card display those widgets.
Add Clear, Enqueue, Repeat, and Shuffle
Implementation of Enqueue was not correct in previous commit.  Also fixed clear_playlist
remove listen and unlisten.
Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @bobrozelle,@rwrozelle

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@rwrozelle
Copy link
Author

Thank you, its obvious now that you've pointed it out. I've signed cla with both accounts.

@rwrozelle
Copy link
Author

I'll work on getting the files updated for ruff. A little confused because it passed ruff in my local dev environment. Most of the MyPY errors look like they are because of the changes needed from esphome/aioesphomeapi#911. How is that handled?

@rwrozelle
Copy link
Author

I've updated the code and updated for all pre-commit requested changes from my local dev environment. I'm going to submit for review, but still unclear if it will pass tests because of changes needed from esphome/aioesphomeapi#911. Is there a way to get the github tester to use updates from another pending Pull Request?

@rwrozelle rwrozelle marked this pull request as ready for review August 1, 2024 15:17
@home-assistant home-assistant bot dismissed stale reviews from themself August 1, 2024 15:17

Stale

Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days.
If you are the author of this PR, please leave a comment if you want to keep it open. Also, please rebase your PR onto the latest dev branch to ensure that it's up to date with the latest changes.
Thank you for your contribution!

@github-actions github-actions bot added the stale label Nov 19, 2024
@frenck frenck marked this pull request as draft November 25, 2024 22:15
@frenck
Copy link
Member

frenck commented Nov 25, 2024

Drafting as this depends on upstream changes.

@github-actions github-actions bot removed the stale label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants