Skip to content

Commit

Permalink
Add issue for moving to core integration (#3246)
Browse files Browse the repository at this point in the history
  • Loading branch information
jozefKruszynski authored Dec 3, 2024
1 parent edba21b commit c077b55
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
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 learn more button to get information how to migrate from the custom to the native integration."
}
},
"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 learn more button to get information how to migrate from the custom to the native integration."
}
},
"config": {
Expand Down

0 comments on commit c077b55

Please sign in to comment.