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

Remove deprecated constants #2974

Closed
wants to merge 2 commits into from
Closed

Remove deprecated constants #2974

wants to merge 2 commits into from

Conversation

OzGav
Copy link
Contributor

@OzGav OzGav commented Sep 28, 2024

I might be way off target here but warnings in HA 2024.10 beta and the associated release notes point to here https://developers.home-assistant.io/blog/2024/09/23/constants-media-player-deprecation/

Looking at the HA code I have come up with this PR. I won't be upset if this is totally wrong! :-)

I might be way off target here but warnings in HA 2024.10 beta and the associated release notes point to here https://developers.home-assistant.io/blog/2024/09/23/constants-media-player-deprecation/

Looking at the HA code I have come up with this PR. I won't be upset if this is totally wrong! :-)
@OzGav OzGav requested a review from marcelveldt September 28, 2024 02:02
@OzGav
Copy link
Contributor Author

OzGav commented Oct 4, 2024

OK I pasted this into my local instance and the integration started without errors so I think it is good but I don't know how to fix the ruff lint problem...?

@@ -28,14 +19,14 @@
if TYPE_CHECKING:
from music_assistant.client import MusicAssistantClient

MEDIA_TYPE_RADIO = "radio"
MediaType.RADIO = "radio"
Copy link
Member

Choose a reason for hiding this comment

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

this is not the way to add an another enum member, better keep the previous custom constant if radio doesnt exist in the HA MediaType enum

Copy link
Contributor Author

@OzGav OzGav Oct 10, 2024

Choose a reason for hiding this comment

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

I think I tried that but lint said no….something said no….

edit: just looked at my commit and yes it was a lint error?

@marcelveldt
Copy link
Member

deprecated by #3057

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