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

Add issue for moving to core integration #3246

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion custom_components/mass/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,22 @@ async def async_setup_entry(
http_session = async_get_clientsession(hass, verify_ssl=False)
mass_url = entry.data[CONF_URL]
mass = MusicAssistantClient(mass_url, http_session)

async_create_issue(
hass,
DOMAIN,
f"move_integration_to_ha_core{DOMAIN}",
breaks_in_ha_version="2024.12.0",
is_fixable=False,
is_persistent=True,
learn_more_url="https://music-assistant.io/integration/installation/#migrating-from-the-hacs-integration-to-the-ha-integration",
issue_domain=DOMAIN,
severity=IssueSeverity.WARNING,
translation_key="move_integration_to_ha_core",
translation_placeholders={
"domain": DOMAIN,
"integration_title": "mass",
},
)
try:
async with asyncio.timeout(CONNECT_TIMEOUT):
await mass.connect()
Expand Down
2 changes: 1 addition & 1 deletion custom_components/mass/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"domain": "mass",
"name": "Music Assistant",
"name": "Music Assistant (CUSTOM)",
"after_dependencies": ["media_source", "media_player"],
"codeowners": ["@music-assistant"],
"config_flow": true,
Expand Down
4 changes: 4 additions & 0 deletions custom_components/mass/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"invalid_server_version": {
"title": "The Music Assistant server is not the correct version",
"description": "Check if there are updates available for the Music Assistant Server and/or integration."
},
"move_integration_to_ha_core": {
"title": "Move to Core Integration",
"description": "The Music Assistant integration has been integrated to Home Assistant Core. You may keep using the custom integration, but it will receive no further support/updates, and will be removed entirely from HACS in the near future. Please click the read more button to get information how to migrate from the custom to the native integration."
jozefKruszynski marked this conversation as resolved.
Show resolved Hide resolved
}
},
"config": {
Expand Down
4 changes: 4 additions & 0 deletions custom_components/mass/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
"invalid_server_version": {
"title": "The Music Assistant server is not the correct version",
"description": "Check if there are updates available for the Music Assistant Server and/or integration."
},
"move_integration_to_ha_core": {
"title": "Move to Core Integration",
"description": "The Music Assistant integration has been integrated to Home Assistant Core. You may keep using the custom integration, but it will receive no further support/updates, and will be removed entirely from HACS in the near future. Please click the read more button to get information how to migrate from the custom to the native integration."
jozefKruszynski marked this conversation as resolved.
Show resolved Hide resolved
}
},
"config": {
Expand Down