8000 Deprecate pandora integration (#145785) · home-assistant/core@a53c786 · GitHub
[go: up one dir, main page]

Skip to content

Commit a53c786

Browse files
edenhausbramkragten
authored andcommitted
Deprecate pandora integration (#145785)
1 parent eb2728e commit a53c786

File tree

5 files changed

+58
-1
lines changed

5 files changed

+58
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
"""The pandora component."""
2+
3+
DOMAIN = "pandora"

homeassistant/components/pandora/media_player.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
SERVICE_VOLUME_DOWN,
2828
SERVICE_VOLUME_UP,
2929
)
30-
from homeassistant.core import Event, HomeAssistant
30+
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, Event, HomeAssistant
3131
from homeassistant.helpers.entity_platform import AddEntitiesCallback
32+
from homeassistant.helpers.issue_registry import IssueSeverity, create_issue
3233
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
3334

35+
from . import DOMAIN
36+
3437
_LOGGER = logging.getLogger(__name__)
3538

3639

@@ -53,6 +56,21 @@ def setup_platform(
5356
discovery_info: DiscoveryInfoType | None = None,
5457
) -> None:
5558
"""Set up the Pandora media player platform."""
59+
create_issue(
60+
hass,
61+
HOMEASSISTANT_DOMAIN,
62+
f"deprecated_system_packages_yaml_integration_{DOMAIN}",
63+
breaks_in_ha_version="2025.12.0",
64+
is_fixable=False,
65+
issue_domain=DOMAIN,
66+
severity=IssueSeverity.WARNING,
67+
translation_key="deprecated_system_packages_yaml_integration",
68+
translation_placeholders={
69+
"domain": DOMAIN,
70+
"integration_title": "Pandora",
71+
},
72+
)
73+
5674
if not _pianobar_exists():
5775
return
5876
pandora = PandoraMediaPlayer("Pandora")

requirements_test_all.txt

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/components/pandora/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Padora component tests."""
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""Pandora media player tests."""
2+
3+
from homeassistant.components.media_player import DOMAIN as PLATFORM_DOMAIN
4+
from homeassistant.components.pandora import DOMAIN as PANDORA_DOMAIN
5+
from homeassistant.const import CONF_PLATFORM
6+
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
7+
from homeassistant.helpers import issue_registry as ir
8+
from homeassistant.setup import async_setup_component
9+
10+
11+
async def test_repair_issue_is_created(
12+
hass: HomeAssistant,
13+
issue_registry: ir.IssueRegistry,
14+
) -> None:
15+
"""Test repair issue is created."""
16+
assert await async_setup_component(
17+
hass,
18+
PLATFORM_DOMAIN,
19+
{
20+
PLATFORM_DOMAIN: [
21+
{
22+
CONF_PLATFORM: PANDORA_DOMAIN,
23+
}
24+
],
25+
},
26+
)
27+
await hass.async_block_till_done()
28+
assert (
29+
HOMEASSISTANT_DOMAIN,
30+
f"deprecated_system_packages_yaml_integration_{PANDORA_DOMAIN}",
31+
) in issue_registry.issues

0 commit comments

Comments
 (0)
0