mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Deprecate pandora integration (#145785)
This commit is contained in:
parent
a857461059
commit
f59001d45f
@ -1 +1,3 @@
|
|||||||
"""The pandora component."""
|
"""The pandora component."""
|
||||||
|
|
||||||
|
DOMAIN = "pandora"
|
||||||
|
@ -27,10 +27,13 @@ from homeassistant.const import (
|
|||||||
SERVICE_VOLUME_DOWN,
|
SERVICE_VOLUME_DOWN,
|
||||||
SERVICE_VOLUME_UP,
|
SERVICE_VOLUME_UP,
|
||||||
)
|
)
|
||||||
from homeassistant.core import Event, HomeAssistant
|
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, Event, HomeAssistant
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
from homeassistant.helpers.issue_registry import IssueSeverity, create_issue
|
||||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||||
|
|
||||||
|
from . import DOMAIN
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@ -53,6 +56,21 @@ def setup_platform(
|
|||||||
discovery_info: DiscoveryInfoType | None = None,
|
discovery_info: DiscoveryInfoType | None = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Set up the Pandora media player platform."""
|
"""Set up the Pandora media player platform."""
|
||||||
|
create_issue(
|
||||||
|
hass,
|
||||||
|
HOMEASSISTANT_DOMAIN,
|
||||||
|
f"deprecated_system_packages_yaml_integration_{DOMAIN}",
|
||||||
|
breaks_in_ha_version="2025.12.0",
|
||||||
|
is_fixable=False,
|
||||||
|
issue_domain=DOMAIN,
|
||||||
|
severity=IssueSeverity.WARNING,
|
||||||
|
translation_key="deprecated_system_packages_yaml_integration",
|
||||||
|
translation_placeholders={
|
||||||
|
"domain": DOMAIN,
|
||||||
|
"integration_title": "Pandora",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
if not _pianobar_exists():
|
if not _pianobar_exists():
|
||||||
return
|
return
|
||||||
pandora = PandoraMediaPlayer("Pandora")
|
pandora = PandoraMediaPlayer("Pandora")
|
||||||
|
5
requirements_test_all.txt
generated
5
requirements_test_all.txt
generated
@ -1393,6 +1393,11 @@ peco==0.1.2
|
|||||||
# homeassistant.components.escea
|
# homeassistant.components.escea
|
||||||
pescea==1.0.12
|
pescea==1.0.12
|
||||||
|
|
||||||
|
# homeassistant.components.aruba
|
||||||
|
# homeassistant.components.cisco_ios
|
||||||
|
# homeassistant.components.pandora
|
||||||
|
pexpect==4.9.0
|
||||||
|
|
||||||
# homeassistant.components.modem_callerid
|
# homeassistant.components.modem_callerid
|
||||||
phone-modem==0.1.1
|
phone-modem==0.1.1
|
||||||
|
|
||||||
|
1
tests/components/pandora/__init__.py
Normal file
1
tests/components/pandora/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
"""Padora component tests."""
|
31
tests/components/pandora/test_media_player.py
Normal file
31
tests/components/pandora/test_media_player.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
"""Pandora media player tests."""
|
||||||
|
|
||||||
|
from homeassistant.components.media_player import DOMAIN as PLATFORM_DOMAIN
|
||||||
|
from homeassistant.components.pandora import DOMAIN as PANDORA_DOMAIN
|
||||||
|
from homeassistant.const import CONF_PLATFORM
|
||||||
|
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
|
||||||
|
from homeassistant.helpers import issue_registry as ir
|
||||||
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
|
||||||
|
async def test_repair_issue_is_created(
|
||||||
|
hass: HomeAssistant,
|
||||||
|
issue_registry: ir.IssueRegistry,
|
||||||
|
) -> None:
|
||||||
|
"""Test repair issue is created."""
|
||||||
|
assert await async_setup_component(
|
||||||
|
hass,
|
||||||
|
PLATFORM_DOMAIN,
|
||||||
|
{
|
||||||
|
PLATFORM_DOMAIN: [
|
||||||
|
{
|
||||||
|
CONF_PLATFORM: PANDORA_DOMAIN,
|
||||||
|
}
|
||||||
|
],
|
||||||
|
},
|
||||||
|
)
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
assert (
|
||||||
|
HOMEASSISTANT_DOMAIN,
|
||||||
|
f"deprecated_system_packages_yaml_integration_{PANDORA_DOMAIN}",
|
||||||
|
) in issue_registry.issues
|
Loading…
x
Reference in New Issue
Block a user