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

Skip to content 8000

Commit cabf786

Browse files
authored
Deprecate snips integration (#145784)
1 parent 0c0a240 commit cabf786

File tree

2 files changed

+32
-5
lines changed

2 files changed

+32
-5
lines changed

homeassistant/components/snips/__init__.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
import voluptuous as vol
88

99
from homeassistant.components import mqtt
10-
from homeassistant.core import HomeAssistant, ServiceCall
10+
from homeassistant.core import (
11+
DOMAIN as HOMEASSISTANT_DOMAIN,
12+
HomeAssistant,
13+
ServiceCall,
14+
)
1115
from homeassistant.helpers import config_validation as cv, intent
16+
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
1217
from homeassistant.helpers.typing import ConfigType
1318

1419
DOMAIN = "snips"
@@ -91,6 +96,20 @@
9196

9297
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
9398
"""Activate Snips component."""
99+
async_create_issue(
100+
hass,
101+
HOMEASSISTANT_DOMAIN,
102+
f"deprecated_system_packages_yaml_integration_{DOMAIN}",
103+
breaks_in_ha_version="2025.12.0",
104+
is_fixable=False,
105+
issue_domain=DOMAIN,
106+
severity=IssueSeverity.WARNING,
107+
translation_key="deprecated_system_packages_yaml_integration",
108+
translation_placeholders={
109+
"domain": DOMAIN,
110+
"integration_title": "Snips",
111+
},
112+
)
94113

95114
# Make sure MQTT integration is enabled and the client is available
96115
if not await mqtt.async_wait_for_mqtt_client(hass):

tests/components/snips/test_init.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,22 @@
77
import voluptuous as vol
88

99
from homeassistant.components import snips
10-
from homeassistant.core import HomeAssistant
10+
from homeassistant.core import DOMAIN as HOMEASSISTANT_DOMAIN, HomeAssistant
11+
from homeassistant.helpers import issue_registry as ir
1112
from homeassistant.helpers.intent import ServiceIntentHandler, async_register
1213
from homeassistant.setup import async_setup_component
1314

1415
from tests.common import async_fire_mqtt_message, async_mock_intent, async_mock_service
1516
from tests.typing import MqttMockHAClient
1617

1718

18-
async def test_snips_config(hass: HomeAssistant, mqtt_mock: MqttMockHAClient) -> None:
19+
async def test_snips_config(
20+
hass: HomeAssistant,
21+
mqtt_mock: MqttMockHAClient,
22+
issue_registry: ir.IssueRegistry,
23+
) -> None:
1924
"""Test Snips Config."""
20-
result = await async_setup_component(
25+
assert await async_setup_component(
2126
hass,
2227
"snips",
2328
{
@@ -28,7 +33,10 @@ async def test_snips_config(hass: HomeAssistant, mqtt_mock: MqttMockHAClient) ->
2833
}
2934
},
3035
)
31-
assert result
36+
assert (
37+
HOMEASSISTANT_DOMAIN,
38+
f"deprecated_system_packages_yaml_integration_{snips.DOMAIN}",
39+
) in issue_registry.issues
3240

3341

3442
async def test_snips_no_mqtt(

0 commit comments

Comments
 (0)
0