diff --git a/custom_components/mass/__init__.py b/custom_components/mass/__init__.py index 4c2cce7c..8455bd75 100644 --- a/custom_components/mass/__init__.py +++ b/custom_components/mass/__init__.py @@ -8,7 +8,7 @@ from homeassistant.config_entries import ConfigEntry, ConfigEntryState from homeassistant.const import CONF_URL, EVENT_HOMEASSISTANT_STOP, Platform -from homeassistant.core import Event, HomeAssistant +from homeassistant.core import Event, HomeAssistant, DOMAIN as HOMEASSISTANT_DOMAIN from homeassistant.exceptions import ConfigEntryNotReady from homeassistant.helpers import config_validation as cv from homeassistant.helpers import device_registry as dr @@ -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() diff --git a/custom_components/mass/manifest.json b/custom_components/mass/manifest.json index ead10e99..86b5271d 100644 --- a/custom_components/mass/manifest.json +++ b/custom_components/mass/manifest.json @@ -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, diff --git a/custom_components/mass/strings.json b/custom_components/mass/strings.json index 46ebce72..ef10202e 100644 --- a/custom_components/mass/strings.json +++ b/custom_components/mass/strings.json @@ -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 HA 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." } }, "config": { diff --git a/custom_components/mass/translations/en.json b/custom_components/mass/translations/en.json index 46ebce72..ef10202e 100644 --- a/custom_components/mass/translations/en.json +++ b/custom_components/mass/translations/en.json @@ -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 HA 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." } }, "config": {