mirror of
https://github.com/home-assistant/core.git
synced 2026-08-24 10:13:52 -05:00
Remove volvooncall integration (#175677)
This commit is contained in:
Generated
-2
@@ -2003,8 +2003,6 @@ CLAUDE.md @home-assistant/core
|
||||
/tests/components/volumio/ @OnFreund
|
||||
/homeassistant/components/volvo/ @thomasddn
|
||||
/tests/components/volvo/ @thomasddn
|
||||
/homeassistant/components/volvooncall/ @molobrakos @svrooij
|
||||
/tests/components/volvooncall/ @molobrakos @svrooij
|
||||
/homeassistant/components/wake_on_lan/ @ntilley905
|
||||
/tests/components/wake_on_lan/ @ntilley905
|
||||
/homeassistant/components/wake_word/ @home-assistant/core @synesthesiam
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
"""The Volvo On Call integration."""
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import issue_registry as ir
|
||||
|
||||
from .const import DOMAIN
|
||||
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Set up Volvo On Call integration."""
|
||||
|
||||
# Create repair issue pointing to the new volvo integration
|
||||
ir.async_create_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"volvooncall_deprecated",
|
||||
breaks_in_ha_version="2026.3",
|
||||
is_fixable=False,
|
||||
severity=ir.IssueSeverity.WARNING,
|
||||
translation_key="volvooncall_deprecated",
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Unload a config entry."""
|
||||
|
||||
# Only delete the repair issue if this is the last config entry for this domain
|
||||
remaining_entries = [
|
||||
config_entry
|
||||
for config_entry in hass.config_entries.async_entries(DOMAIN)
|
||||
if config_entry.entry_id != entry.entry_id
|
||||
]
|
||||
|
||||
if not remaining_entries:
|
||||
ir.async_delete_issue(
|
||||
hass,
|
||||
DOMAIN,
|
||||
"volvooncall_deprecated",
|
||||
)
|
||||
|
||||
return True
|
||||
@@ -1,21 +0,0 @@
|
||||
"""Config flow for Volvo On Call integration."""
|
||||
|
||||
from typing import Any, override
|
||||
|
||||
from homeassistant.config_entries import ConfigFlow, ConfigFlowResult
|
||||
|
||||
from .const import DOMAIN
|
||||
|
||||
|
||||
class VolvoOnCallConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for Volvo On Call."""
|
||||
|
||||
VERSION = 1
|
||||
|
||||
@override
|
||||
async def async_step_user(
|
||||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
"""Handle the initial step."""
|
||||
|
||||
return self.async_abort(reason="deprecated")
|
||||
@@ -1,3 +0,0 @@
|
||||
"""Constants for the Volvo On Call integration."""
|
||||
|
||||
DOMAIN = "volvooncall"
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"domain": "volvooncall",
|
||||
"name": "Volvo On Call",
|
||||
"codeowners": ["@molobrakos", "@svrooij"],
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/volvooncall",
|
||||
"iot_class": "cloud_polling",
|
||||
"quality_scale": "legacy"
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"config": {
|
||||
"abort": {
|
||||
"deprecated": "Volvo On Call has been replaced by the Volvo integration. Please use the Volvo integration instead."
|
||||
},
|
||||
"step": {
|
||||
"user": {
|
||||
"description": "Volvo on Call is deprecated, use the Volvo integration"
|
||||
}
|
||||
}
|
||||
},
|
||||
"issues": {
|
||||
"volvooncall_deprecated": {
|
||||
"description": "The Volvo On Call integration is deprecated and will be removed in 2026.3. Please use the Volvo integration instead.\n\nSteps:\n1. Remove this Volvo On Call integration.\n2. Add the Volvo integration through Settings > Devices & services > Add integration > Volvo.\n3. Follow the setup instructions to authenticate with your Volvo account.",
|
||||
"title": "Volvo On Call has been replaced"
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
-1
@@ -851,7 +851,6 @@ FLOWS = {
|
||||
"voip",
|
||||
"volumio",
|
||||
"volvo",
|
||||
"volvooncall",
|
||||
"wake_on_lan",
|
||||
"wallbox",
|
||||
"waqi",
|
||||
|
||||
@@ -7907,12 +7907,6 @@
|
||||
"config_flow": true,
|
||||
"iot_class": "cloud_polling"
|
||||
},
|
||||
"volvooncall": {
|
||||
"name": "Volvo On Call",
|
||||
"integration_type": "hub",
|
||||
"config_flow": true,
|
||||
"iot_class": "cloud_polling"
|
||||
},
|
||||
"w800rf32": {
|
||||
"name": "WGL Designs W800RF32",
|
||||
"integration_type": "hub",
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
"""Tests for the Volvo On Call integration."""
|
||||
@@ -1,35 +0,0 @@
|
||||
"""Test the Volvo On Call config flow."""
|
||||
|
||||
from homeassistant import config_entries
|
||||
from homeassistant.components.volvooncall.const import DOMAIN
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.data_entry_flow import FlowResultType
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
async def test_form(hass: HomeAssistant) -> None:
|
||||
"""Test we get an abort with deprecation message."""
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "deprecated"
|
||||
|
||||
|
||||
async def test_flow_aborts_with_existing_config_entry(hass: HomeAssistant) -> None:
|
||||
"""Test the config flow aborts even with existing config entries."""
|
||||
# Create an existing config entry
|
||||
entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="Volvo On Call",
|
||||
data={},
|
||||
)
|
||||
entry.add_to_hass(hass)
|
||||
|
||||
# New flow should still abort
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||
)
|
||||
assert result["type"] is FlowResultType.ABORT
|
||||
assert result["reason"] == "deprecated"
|
||||
@@ -1,76 +0,0 @@
|
||||
"""Test the Volvo On Call integration setup."""
|
||||
|
||||
from homeassistant.components.volvooncall.const import DOMAIN
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import issue_registry as ir
|
||||
|
||||
from tests.common import MockConfigEntry
|
||||
|
||||
|
||||
async def test_setup_entry_creates_repair_issue(
|
||||
hass: HomeAssistant, issue_registry: ir.IssueRegistry
|
||||
) -> None:
|
||||
"""Test that setup creates a repair issue."""
|
||||
entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="Volvo On Call",
|
||||
data={},
|
||||
)
|
||||
entry.add_to_hass(hass)
|
||||
|
||||
assert await hass.config_entries.async_setup(entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert entry.state is ConfigEntryState.LOADED
|
||||
issue = issue_registry.async_get_issue(DOMAIN, "volvooncall_deprecated")
|
||||
|
||||
assert issue is not None
|
||||
assert issue.severity is ir.IssueSeverity.WARNING
|
||||
assert issue.translation_key == "volvooncall_deprecated"
|
||||
|
||||
|
||||
async def test_unload_entry_removes_repair_issue(
|
||||
hass: HomeAssistant, issue_registry: ir.IssueRegistry
|
||||
) -> None:
|
||||
"""Test that unloading the last config entry removes the repair issue."""
|
||||
first_config_entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="Volvo On Call",
|
||||
data={},
|
||||
)
|
||||
first_config_entry.add_to_hass(hass)
|
||||
second_config_entry = MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="Volvo On Call second",
|
||||
data={},
|
||||
)
|
||||
second_config_entry.add_to_hass(hass)
|
||||
|
||||
# Setup entry
|
||||
assert await hass.config_entries.async_setup(first_config_entry.entry_id)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert len(hass.config_entries.async_entries(DOMAIN)) == 2
|
||||
|
||||
# Check that the repair issue was created
|
||||
issue = issue_registry.async_get_issue(DOMAIN, "volvooncall_deprecated")
|
||||
assert issue is not None
|
||||
|
||||
# Unload entry (this is the only entry, so issue should be removed)
|
||||
assert await hass.config_entries.async_remove(first_config_entry.entry_id)
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
|
||||
assert len(hass.config_entries.async_entries(DOMAIN)) == 1
|
||||
|
||||
# Check that the repair issue still exists because there's another entry
|
||||
issue = issue_registry.async_get_issue(DOMAIN, "volvooncall_deprecated")
|
||||
assert issue is not None
|
||||
|
||||
# Unload entry (this is the only entry, so issue should be removed)
|
||||
assert await hass.config_entries.async_remove(second_config_entry.entry_id)
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
|
||||
# Check that the repair issue was removed
|
||||
issue = issue_registry.async_get_issue(DOMAIN, "volvooncall_deprecated")
|
||||
assert issue is None
|
||||
Reference in New Issue
Block a user