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

Support songpal wireless-only soundbar identifiers #65330

Merged
merged 1 commit into from Feb 6, 2022

Conversation

Flameeyes
Copy link
Contributor

Proposed change

As shown in #64868, a number of newer models don't come wiht a macAddr
attributes, so for those fall back to the wireless address.

This could be hidden by the python-songpal library but for now this will
make it possible to have multiple modern songpal devices on the same
network.

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)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

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
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

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.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@probot-home-assistant
Copy link

Hey there @rytilahti, @shenxn, mind taking a look at this pull request as it has been labeled with an integration (songpal) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@project-bot project-bot bot added this to Needs review in Dev Jan 31, 2022
@MartinHjelmare MartinHjelmare changed the title songpal: fully support wireless-only soundbars identifiers. Support songpal wireless-only soundbars identifiers Jan 31, 2022
@Flameeyes Flameeyes force-pushed the sony-songpal-mac branch 3 times, most recently from 3025fae to 5d90215 Compare February 5, 2022 16:04
As shown in home-assistant#64868, a number of newer models don't come wiht a macAddr
attributes, so for those fall back to the wireless address.

This could be hidden by the python-songpal library but for now this will
make it possible to have multiple modern songpal devices on the same
network.
Dev automation moved this from Needs review to Reviewer approved Feb 5, 2022
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Looks good!

@MartinHjelmare
Copy link
Member

Should we tag it for a patch release?

@Flameeyes
Copy link
Contributor Author

I think it would be fine to be in a patch release. But I'm not entirely sure whether the fact that entities might go from "no unique id" to "have unique id" would complicate things.

(The unique ID is only changed for entities that currently wouldn't have one, because they don't have a wired address — that's why it prefers the wired mac as unique identifier.)

@MartinHjelmare
Copy link
Member

A possible complication would be if the user would roll back the update, the entity registry would still have the entry with the unique_id and not allow the entity without the unique_id to get its old entity_id but generate a new entity_id with a suffix.

@rytilahti
Copy link
Member

Is non-backwards compatibility a blocker here, and if yes, what is be the proper way to solve this? My personal opinion is that this is ready to go as the pros clearly outweigh the cons. Also, I don't think most of the other integrations do offer a working downgrade path either..

@MartinHjelmare
Copy link
Member

We should definitely merge this. It's just a question of do we include it in a patch release?

@rytilahti
Copy link
Member

Ah, sorry for being unclear. My previous comment was for getting this into the next patch release, but I'll ping on discord to get another opinion on that.

@rytilahti rytilahti changed the title Support songpal wireless-only soundbars identifiers Support songpal wireless-only soundbar identifiers Feb 6, 2022
@rytilahti rytilahti merged commit c6aa526 into home-assistant:dev Feb 6, 2022
Dev automation moved this from Reviewer approved to Done Feb 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

Songpal not generating unique ID
4 participants