Rename Amazon Devices to Alexa Devices (#146362)

Co-authored-by: Simone Chemelli <simone.chemelli@gmail.com>
Co-authored-by: Joostlek <joostlek@outlook.com>
This commit is contained in:
tronikos 2025-06-11 09:35:26 -07:00 committed by GitHub
parent bdb6124aa3
commit 2f6fcb5801
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
35 changed files with 67 additions and 67 deletions

View File

@ -65,8 +65,8 @@ homeassistant.components.aladdin_connect.*
homeassistant.components.alarm_control_panel.* homeassistant.components.alarm_control_panel.*
homeassistant.components.alert.* homeassistant.components.alert.*
homeassistant.components.alexa.* homeassistant.components.alexa.*
homeassistant.components.alexa_devices.*
homeassistant.components.alpha_vantage.* homeassistant.components.alpha_vantage.*
homeassistant.components.amazon_devices.*
homeassistant.components.amazon_polly.* homeassistant.components.amazon_polly.*
homeassistant.components.amberelectric.* homeassistant.components.amberelectric.*
homeassistant.components.ambient_network.* homeassistant.components.ambient_network.*

4
CODEOWNERS generated
View File

@ -89,8 +89,8 @@ build.json @home-assistant/supervisor
/tests/components/alert/ @home-assistant/core @frenck /tests/components/alert/ @home-assistant/core @frenck
/homeassistant/components/alexa/ @home-assistant/cloud @ochlocracy @jbouwh /homeassistant/components/alexa/ @home-assistant/cloud @ochlocracy @jbouwh
/tests/components/alexa/ @home-assistant/cloud @ochlocracy @jbouwh /tests/components/alexa/ @home-assistant/cloud @ochlocracy @jbouwh
/homeassistant/components/amazon_devices/ @chemelli74 /homeassistant/components/alexa_devices/ @chemelli74
/tests/components/amazon_devices/ @chemelli74 /tests/components/alexa_devices/ @chemelli74
/homeassistant/components/amazon_polly/ @jschlyter /homeassistant/components/amazon_polly/ @jschlyter
/homeassistant/components/amberelectric/ @madpilot /homeassistant/components/amberelectric/ @madpilot
/tests/components/amberelectric/ @madpilot /tests/components/amberelectric/ @madpilot

View File

@ -3,7 +3,7 @@
"name": "Amazon", "name": "Amazon",
"integrations": [ "integrations": [
"alexa", "alexa",
"amazon_devices", "alexa_devices",
"amazon_polly", "amazon_polly",
"aws", "aws",
"aws_s3", "aws_s3",

View File

@ -1,4 +1,4 @@
"""Amazon Devices integration.""" """Alexa Devices integration."""
from homeassistant.const import Platform from homeassistant.const import Platform
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
@ -13,7 +13,7 @@ PLATFORMS = [
async def async_setup_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bool: async def async_setup_entry(hass: HomeAssistant, entry: AmazonConfigEntry) -> bool:
"""Set up Amazon Devices platform.""" """Set up Alexa Devices platform."""
coordinator = AmazonDevicesCoordinator(hass, entry) coordinator = AmazonDevicesCoordinator(hass, entry)

View File

@ -26,7 +26,7 @@ PARALLEL_UPDATES = 0
@dataclass(frozen=True, kw_only=True) @dataclass(frozen=True, kw_only=True)
class AmazonBinarySensorEntityDescription(BinarySensorEntityDescription): class AmazonBinarySensorEntityDescription(BinarySensorEntityDescription):
"""Amazon Devices binary sensor entity description.""" """Alexa Devices binary sensor entity description."""
is_on_fn: Callable[[AmazonDevice], bool] is_on_fn: Callable[[AmazonDevice], bool]
@ -52,7 +52,7 @@ async def async_setup_entry(
entry: AmazonConfigEntry, entry: AmazonConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback, async_add_entities: AddConfigEntryEntitiesCallback,
) -> None: ) -> None:
"""Set up Amazon Devices binary sensors based on a config entry.""" """Set up Alexa Devices binary sensors based on a config entry."""
coordinator = entry.runtime_data coordinator = entry.runtime_data

View File

@ -1,4 +1,4 @@
"""Config flow for Amazon Devices integration.""" """Config flow for Alexa Devices integration."""
from __future__ import annotations from __future__ import annotations
@ -17,7 +17,7 @@ from .const import CONF_LOGIN_DATA, DOMAIN
class AmazonDevicesConfigFlow(ConfigFlow, domain=DOMAIN): class AmazonDevicesConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Amazon Devices.""" """Handle a config flow for Alexa Devices."""
async def async_step_user( async def async_step_user(
self, user_input: dict[str, Any] | None = None self, user_input: dict[str, Any] | None = None

View File

@ -1,8 +1,8 @@
"""Amazon Devices constants.""" """Alexa Devices constants."""
import logging import logging
_LOGGER = logging.getLogger(__package__) _LOGGER = logging.getLogger(__package__)
DOMAIN = "amazon_devices" DOMAIN = "alexa_devices"
CONF_LOGIN_DATA = "login_data" CONF_LOGIN_DATA = "login_data"

View File

@ -1,4 +1,4 @@
"""Support for Amazon Devices.""" """Support for Alexa Devices."""
from datetime import timedelta from datetime import timedelta
@ -23,7 +23,7 @@ type AmazonConfigEntry = ConfigEntry[AmazonDevicesCoordinator]
class AmazonDevicesCoordinator(DataUpdateCoordinator[dict[str, AmazonDevice]]): class AmazonDevicesCoordinator(DataUpdateCoordinator[dict[str, AmazonDevice]]):
"""Base coordinator for Amazon Devices.""" """Base coordinator for Alexa Devices."""
config_entry: AmazonConfigEntry config_entry: AmazonConfigEntry

View File

@ -1,4 +1,4 @@
"""Diagnostics support for Amazon Devices integration.""" """Diagnostics support for Alexa Devices integration."""
from __future__ import annotations from __future__ import annotations

View File

@ -1,4 +1,4 @@
"""Defines a base Amazon Devices entity.""" """Defines a base Alexa Devices entity."""
from aioamazondevices.api import AmazonDevice from aioamazondevices.api import AmazonDevice
from aioamazondevices.const import SPEAKER_GROUP_MODEL from aioamazondevices.const import SPEAKER_GROUP_MODEL
@ -12,7 +12,7 @@ from .coordinator import AmazonDevicesCoordinator
class AmazonEntity(CoordinatorEntity[AmazonDevicesCoordinator]): class AmazonEntity(CoordinatorEntity[AmazonDevicesCoordinator]):
"""Defines a base Amazon Devices entity.""" """Defines a base Alexa Devices entity."""
_attr_has_entity_name = True _attr_has_entity_name = True

View File

@ -1,9 +1,9 @@
{ {
"domain": "amazon_devices", "domain": "alexa_devices",
"name": "Amazon Devices", "name": "Alexa Devices",
"codeowners": ["@chemelli74"], "codeowners": ["@chemelli74"],
"config_flow": true, "config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/amazon_devices", "documentation": "https://www.home-assistant.io/integrations/alexa_devices",
"integration_type": "hub", "integration_type": "hub",
"iot_class": "cloud_polling", "iot_class": "cloud_polling",
"loggers": ["aioamazondevices"], "loggers": ["aioamazondevices"],

View File

@ -20,7 +20,7 @@ PARALLEL_UPDATES = 1
@dataclass(frozen=True, kw_only=True) @dataclass(frozen=True, kw_only=True)
class AmazonNotifyEntityDescription(NotifyEntityDescription): class AmazonNotifyEntityDescription(NotifyEntityDescription):
"""Amazon Devices notify entity description.""" """Alexa Devices notify entity description."""
method: Callable[[AmazonEchoApi, AmazonDevice, str], Awaitable[None]] method: Callable[[AmazonEchoApi, AmazonDevice, str], Awaitable[None]]
subkey: str subkey: str
@ -49,7 +49,7 @@ async def async_setup_entry(
entry: AmazonConfigEntry, entry: AmazonConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback, async_add_entities: AddConfigEntryEntitiesCallback,
) -> None: ) -> None:
"""Set up Amazon Devices notification entity based on a config entry.""" """Set up Alexa Devices notification entity based on a config entry."""
coordinator = entry.runtime_data coordinator = entry.runtime_data

View File

@ -12,16 +12,16 @@
"step": { "step": {
"user": { "user": {
"data": { "data": {
"country": "[%key:component::amazon_devices::common::data_country%]", "country": "[%key:component::alexa_devices::common::data_country%]",
"username": "[%key:common::config_flow::data::username%]", "username": "[%key:common::config_flow::data::username%]",
"password": "[%key:common::config_flow::data::password%]", "password": "[%key:common::config_flow::data::password%]",
"code": "[%key:component::amazon_devices::common::data_description_code%]" "code": "[%key:component::alexa_devices::common::data_description_code%]"
}, },
"data_description": { "data_description": {
"country": "[%key:component::amazon_devices::common::data_description_country%]", "country": "[%key:component::alexa_devices::common::data_description_country%]",
"username": "[%key:component::amazon_devices::common::data_description_username%]", "username": "[%key:component::alexa_devices::common::data_description_username%]",
"password": "[%key:component::amazon_devices::common::data_description_password%]", "password": "[%key:component::alexa_devices::common::data_description_password%]",
"code": "[%key:component::amazon_devices::common::data_description_code%]" "code": "[%key:component::alexa_devices::common::data_description_code%]"
} }
} }
}, },

View File

@ -20,7 +20,7 @@ PARALLEL_UPDATES = 1
@dataclass(frozen=True, kw_only=True) @dataclass(frozen=True, kw_only=True)
class AmazonSwitchEntityDescription(SwitchEntityDescription): class AmazonSwitchEntityDescription(SwitchEntityDescription):
"""Amazon Devices switch entity description.""" """Alexa Devices switch entity description."""
is_on_fn: Callable[[AmazonDevice], bool] is_on_fn: Callable[[AmazonDevice], bool]
subkey: str subkey: str
@ -43,7 +43,7 @@ async def async_setup_entry(
entry: AmazonConfigEntry, entry: AmazonConfigEntry,
async_add_entities: AddConfigEntryEntitiesCallback, async_add_entities: AddConfigEntryEntitiesCallback,
) -> None: ) -> None:
"""Set up Amazon Devices switches based on a config entry.""" """Set up Alexa Devices switches based on a config entry."""
coordinator = entry.runtime_data coordinator = entry.runtime_data

View File

@ -47,7 +47,7 @@ FLOWS = {
"airzone", "airzone",
"airzone_cloud", "airzone_cloud",
"alarmdecoder", "alarmdecoder",
"amazon_devices", "alexa_devices",
"amberelectric", "amberelectric",
"ambient_network", "ambient_network",
"ambient_station", "ambient_station",

View File

@ -207,11 +207,11 @@
"amazon": { "amazon": {
"name": "Amazon", "name": "Amazon",
"integrations": { "integrations": {
"amazon_devices": { "alexa_devices": {
"integration_type": "hub", "integration_type": "hub",
"config_flow": true, "config_flow": true,
"iot_class": "cloud_polling", "iot_class": "cloud_polling",
"name": "Amazon Devices" "name": "Alexa Devices"
}, },
"amazon_polly": { "amazon_polly": {
"integration_type": "hub", "integration_type": "hub",

4
mypy.ini generated
View File

@ -405,7 +405,7 @@ disallow_untyped_defs = true
warn_return_any = true warn_return_any = true
warn_unreachable = true warn_unreachable = true
[mypy-homeassistant.components.alpha_vantage.*] [mypy-homeassistant.components.alexa_devices.*]
check_untyped_defs = true check_untyped_defs = true
disallow_incomplete_defs = true disallow_incomplete_defs = true
disallow_subclassing_any = true disallow_subclassing_any = true
@ -415,7 +415,7 @@ disallow_untyped_defs = true
warn_return_any = true warn_return_any = true
warn_unreachable = true warn_unreachable = true
[mypy-homeassistant.components.amazon_devices.*] [mypy-homeassistant.components.alpha_vantage.*]
check_untyped_defs = true check_untyped_defs = true
disallow_incomplete_defs = true disallow_incomplete_defs = true
disallow_subclassing_any = true disallow_subclassing_any = true

2
requirements_all.txt generated
View File

@ -181,7 +181,7 @@ aioairzone-cloud==0.6.12
# homeassistant.components.airzone # homeassistant.components.airzone
aioairzone==1.0.0 aioairzone==1.0.0
# homeassistant.components.amazon_devices # homeassistant.components.alexa_devices
aioamazondevices==3.0.6 aioamazondevices==3.0.6
# homeassistant.components.ambient_network # homeassistant.components.ambient_network

View File

@ -169,7 +169,7 @@ aioairzone-cloud==0.6.12
# homeassistant.components.airzone # homeassistant.components.airzone
aioairzone==1.0.0 aioairzone==1.0.0
# homeassistant.components.amazon_devices # homeassistant.components.alexa_devices
aioamazondevices==3.0.6 aioamazondevices==3.0.6
# homeassistant.components.ambient_network # homeassistant.components.ambient_network

View File

@ -1,4 +1,4 @@
"""Tests for the Amazon Devices integration.""" """Tests for the Alexa Devices integration."""
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,4 +1,4 @@
"""Amazon Devices tests configuration.""" """Alexa Devices tests configuration."""
from collections.abc import Generator from collections.abc import Generator
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
@ -7,7 +7,7 @@ from aioamazondevices.api import AmazonDevice
from aioamazondevices.const import DEVICE_TYPE_TO_MODEL from aioamazondevices.const import DEVICE_TYPE_TO_MODEL
import pytest import pytest
from homeassistant.components.amazon_devices.const import CONF_LOGIN_DATA, DOMAIN from homeassistant.components.alexa_devices.const import CONF_LOGIN_DATA, DOMAIN
from homeassistant.const import CONF_COUNTRY, CONF_PASSWORD, CONF_USERNAME from homeassistant.const import CONF_COUNTRY, CONF_PASSWORD, CONF_USERNAME
from .const import TEST_COUNTRY, TEST_PASSWORD, TEST_SERIAL_NUMBER, TEST_USERNAME from .const import TEST_COUNTRY, TEST_PASSWORD, TEST_SERIAL_NUMBER, TEST_USERNAME
@ -19,7 +19,7 @@ from tests.common import MockConfigEntry
def mock_setup_entry() -> Generator[AsyncMock]: def mock_setup_entry() -> Generator[AsyncMock]:
"""Override async_setup_entry.""" """Override async_setup_entry."""
with patch( with patch(
"homeassistant.components.amazon_devices.async_setup_entry", "homeassistant.components.alexa_devices.async_setup_entry",
return_value=True, return_value=True,
) as mock_setup_entry: ) as mock_setup_entry:
yield mock_setup_entry yield mock_setup_entry
@ -27,14 +27,14 @@ def mock_setup_entry() -> Generator[AsyncMock]:
@pytest.fixture @pytest.fixture
def mock_amazon_devices_client() -> Generator[AsyncMock]: def mock_amazon_devices_client() -> Generator[AsyncMock]:
"""Mock an Amazon Devices client.""" """Mock an Alexa Devices client."""
with ( with (
patch( patch(
"homeassistant.components.amazon_devices.coordinator.AmazonEchoApi", "homeassistant.components.alexa_devices.coordinator.AmazonEchoApi",
autospec=True, autospec=True,
) as mock_client, ) as mock_client,
patch( patch(
"homeassistant.components.amazon_devices.config_flow.AmazonEchoApi", "homeassistant.components.alexa_devices.config_flow.AmazonEchoApi",
new=mock_client, new=mock_client,
), ),
): ):

View File

@ -1,4 +1,4 @@
"""Amazon Devices tests const.""" """Alexa Devices tests const."""
TEST_CODE = "023123" TEST_CODE = "023123"
TEST_COUNTRY = "IT" TEST_COUNTRY = "IT"

View File

@ -25,7 +25,7 @@
'original_device_class': None, 'original_device_class': None,
'original_icon': None, 'original_icon': None,
'original_name': 'Bluetooth', 'original_name': 'Bluetooth',
'platform': 'amazon_devices', 'platform': 'alexa_devices',
'previous_unique_id': None, 'previous_unique_id': None,
'suggested_object_id': None, 'suggested_object_id': None,
'supported_features': 0, 'supported_features': 0,
@ -73,7 +73,7 @@
'original_device_class': <BinarySensorDeviceClass.CONNECTIVITY: 'connectivity'>, 'original_device_class': <BinarySensorDeviceClass.CONNECTIVITY: 'connectivity'>,
'original_icon': None, 'original_icon': None,
'original_name': 'Connectivity', 'original_name': 'Connectivity',
'platform': 'amazon_devices', 'platform': 'alexa_devices',
'previous_unique_id': None, 'previous_unique_id': None,
'suggested_object_id': None, 'suggested_object_id': None,
'supported_features': 0, 'supported_features': 0,

View File

@ -57,7 +57,7 @@
'disabled_by': None, 'disabled_by': None,
'discovery_keys': dict({ 'discovery_keys': dict({
}), }),
'domain': 'amazon_devices', 'domain': 'alexa_devices',
'minor_version': 1, 'minor_version': 1,
'options': dict({ 'options': dict({
}), }),

View File

@ -13,7 +13,7 @@
'id': <ANY>, 'id': <ANY>,
'identifiers': set({ 'identifiers': set({
tuple( tuple(
'amazon_devices', 'alexa_devices',
'echo_test_serial_number', 'echo_test_serial_number',
), ),
}), }),

View File

@ -25,7 +25,7 @@
'original_device_class': None, 'original_device_class': None,
'original_icon': None, 'original_icon': None,
'original_name': 'Announce', 'original_name': 'Announce',
'platform': 'amazon_devices', 'platform': 'alexa_devices',
'previous_unique_id': None, 'previous_unique_id': None,
'suggested_object_id': None, 'suggested_object_id': None,
'supported_features': 0, 'supported_features': 0,
@ -74,7 +74,7 @@
'original_device_class': None, 'original_device_class': None,
'original_icon': None, 'original_icon': None,
'original_name': 'Speak', 'original_name': 'Speak',
'platform': 'amazon_devices', 'platform': 'alexa_devices',
'previous_unique_id': None, 'previous_unique_id': None,
'suggested_object_id': None, 'suggested_object_id': None,
'supported_features': 0, 'supported_features': 0,

View File

@ -25,7 +25,7 @@
'original_device_class': None, 'original_device_class': None,
'original_icon': None, 'original_icon': None,
'original_name': 'Do not disturb', 'original_name': 'Do not disturb',
'platform': 'amazon_devices', 'platform': 'alexa_devices',
'previous_unique_id': None, 'previous_unique_id': None,
'suggested_object_id': None, 'suggested_object_id': None,
'supported_features': 0, 'supported_features': 0,

View File

@ -1,4 +1,4 @@
"""Tests for the Amazon Devices binary sensor platform.""" """Tests for the Alexa Devices binary sensor platform."""
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
@ -11,7 +11,7 @@ from freezegun.api import FrozenDateTimeFactory
import pytest import pytest
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from homeassistant.components.amazon_devices.coordinator import SCAN_INTERVAL from homeassistant.components.alexa_devices.coordinator import SCAN_INTERVAL
from homeassistant.const import STATE_ON, STATE_UNAVAILABLE, Platform from homeassistant.const import STATE_ON, STATE_UNAVAILABLE, Platform
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as er from homeassistant.helpers import entity_registry as er
@ -31,7 +31,7 @@ async def test_all_entities(
) -> None: ) -> None:
"""Test all entities.""" """Test all entities."""
with patch( with patch(
"homeassistant.components.amazon_devices.PLATFORMS", [Platform.BINARY_SENSOR] "homeassistant.components.alexa_devices.PLATFORMS", [Platform.BINARY_SENSOR]
): ):
await setup_integration(hass, mock_config_entry) await setup_integration(hass, mock_config_entry)

View File

@ -1,11 +1,11 @@
"""Tests for the Amazon Devices config flow.""" """Tests for the Alexa Devices config flow."""
from unittest.mock import AsyncMock from unittest.mock import AsyncMock
from aioamazondevices.exceptions import CannotAuthenticate, CannotConnect from aioamazondevices.exceptions import CannotAuthenticate, CannotConnect
import pytest import pytest
from homeassistant.components.amazon_devices.const import CONF_LOGIN_DATA, DOMAIN from homeassistant.components.alexa_devices.const import CONF_LOGIN_DATA, DOMAIN
from homeassistant.config_entries import SOURCE_USER from homeassistant.config_entries import SOURCE_USER
from homeassistant.const import CONF_CODE, CONF_COUNTRY, CONF_PASSWORD, CONF_USERNAME from homeassistant.const import CONF_CODE, CONF_COUNTRY, CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant

View File

@ -1,4 +1,4 @@
"""Tests for Amazon Devices diagnostics platform.""" """Tests for Alexa Devices diagnostics platform."""
from __future__ import annotations from __future__ import annotations
@ -7,7 +7,7 @@ from unittest.mock import AsyncMock
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props from syrupy.filters import props
from homeassistant.components.amazon_devices.const import DOMAIN from homeassistant.components.alexa_devices.const import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr from homeassistant.helpers import device_registry as dr

View File

@ -1,10 +1,10 @@
"""Tests for the Amazon Devices integration.""" """Tests for the Alexa Devices integration."""
from unittest.mock import AsyncMock from unittest.mock import AsyncMock
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from homeassistant.components.amazon_devices.const import DOMAIN from homeassistant.components.alexa_devices.const import DOMAIN
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr from homeassistant.helpers import device_registry as dr

View File

@ -1,4 +1,4 @@
"""Tests for the Amazon Devices notify platform.""" """Tests for the Alexa Devices notify platform."""
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
@ -6,7 +6,7 @@ from freezegun.api import FrozenDateTimeFactory
import pytest import pytest
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from homeassistant.components.amazon_devices.coordinator import SCAN_INTERVAL from homeassistant.components.alexa_devices.coordinator import SCAN_INTERVAL
from homeassistant.components.notify import ( from homeassistant.components.notify import (
ATTR_MESSAGE, ATTR_MESSAGE,
DOMAIN as NOTIFY_DOMAIN, DOMAIN as NOTIFY_DOMAIN,
@ -32,7 +32,7 @@ async def test_all_entities(
entity_registry: er.EntityRegistry, entity_registry: er.EntityRegistry,
) -> None: ) -> None:
"""Test all entities.""" """Test all entities."""
with patch("homeassistant.components.amazon_devices.PLATFORMS", [Platform.NOTIFY]): with patch("homeassistant.components.alexa_devices.PLATFORMS", [Platform.NOTIFY]):
await setup_integration(hass, mock_config_entry) await setup_integration(hass, mock_config_entry)
await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)

View File

@ -1,4 +1,4 @@
"""Tests for the Amazon Devices switch platform.""" """Tests for the Alexa Devices switch platform."""
from unittest.mock import AsyncMock, patch from unittest.mock import AsyncMock, patch
@ -6,7 +6,7 @@ from freezegun.api import FrozenDateTimeFactory
import pytest import pytest
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
from homeassistant.components.amazon_devices.coordinator import SCAN_INTERVAL from homeassistant.components.alexa_devices.coordinator import SCAN_INTERVAL
from homeassistant.components.switch import ( from homeassistant.components.switch import (
DOMAIN as SWITCH_DOMAIN, DOMAIN as SWITCH_DOMAIN,
SERVICE_TURN_OFF, SERVICE_TURN_OFF,
@ -37,7 +37,7 @@ async def test_all_entities(
entity_registry: er.EntityRegistry, entity_registry: er.EntityRegistry,
) -> None: ) -> None:
"""Test all entities.""" """Test all entities."""
with patch("homeassistant.components.amazon_devices.PLATFORMS", [Platform.SWITCH]): with patch("homeassistant.components.alexa_devices.PLATFORMS", [Platform.SWITCH]):
await setup_integration(hass, mock_config_entry) await setup_integration(hass, mock_config_entry)
await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id) await snapshot_platform(hass, entity_registry, snapshot, mock_config_entry.entry_id)