diff --git a/homeassistant/components/otbr/config_flow.py b/homeassistant/components/otbr/config_flow.py index b92e978f1be..306a7f7e700 100644 --- a/homeassistant/components/otbr/config_flow.py +++ b/homeassistant/components/otbr/config_flow.py @@ -14,7 +14,7 @@ from .const import DOMAIN class OTBRConfigFlow(ConfigFlow, domain=DOMAIN): - """Handle a config flow for Home Assistant SkyConnect.""" + """Handle a config flow for Open Thread Border Router.""" VERSION = 1 @@ -37,7 +37,7 @@ class OTBRConfigFlow(ConfigFlow, domain=DOMAIN): else: await self.async_set_unique_id(DOMAIN) return self.async_create_entry( - title="Thread", + title="Open Thread Border Router", data=user_input, ) @@ -55,6 +55,6 @@ class OTBRConfigFlow(ConfigFlow, domain=DOMAIN): url = f"http://{config['host']}:{config['port']}" await self.async_set_unique_id(DOMAIN) return self.async_create_entry( - title="Thread", + title="Open Thread Border Router", data={"url": url}, ) diff --git a/homeassistant/components/otbr/manifest.json b/homeassistant/components/otbr/manifest.json index 4adb9e3ecdc..50ca47c281e 100644 --- a/homeassistant/components/otbr/manifest.json +++ b/homeassistant/components/otbr/manifest.json @@ -1,6 +1,6 @@ { "domain": "otbr", - "name": "Thread", + "name": "Open Thread Border Router", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/otbr", "requirements": ["python-otbr-api==1.0.1"], diff --git a/homeassistant/generated/integrations.json b/homeassistant/generated/integrations.json index 68d022f43f8..96e7568762c 100644 --- a/homeassistant/generated/integrations.json +++ b/homeassistant/generated/integrations.json @@ -3966,7 +3966,7 @@ "iot_class": "local_polling" }, "otbr": { - "name": "Thread", + "name": "Open Thread Border Router", "integration_type": "service", "config_flow": true, "iot_class": "local_polling" diff --git a/tests/components/otbr/__init__.py b/tests/components/otbr/__init__.py index 2ec5befd47c..ab62c8c6327 100644 --- a/tests/components/otbr/__init__.py +++ b/tests/components/otbr/__init__.py @@ -1,2 +1,2 @@ -"""Tests for the Thread integration.""" +"""Tests for the Open Thread Border Router integration.""" BASE_URL = "http://core-silabs-multiprotocol:8081" diff --git a/tests/components/otbr/conftest.py b/tests/components/otbr/conftest.py index 0a0438e8bd7..93421660b1f 100644 --- a/tests/components/otbr/conftest.py +++ b/tests/components/otbr/conftest.py @@ -1,4 +1,4 @@ -"""Test fixtures for the Home Assistant SkyConnect integration.""" +"""Test fixtures for the Open Thread Border Router integration.""" from unittest.mock import patch import pytest @@ -10,14 +10,14 @@ from tests.common import MockConfigEntry CONFIG_ENTRY_DATA = {"url": "http://core-silabs-multiprotocol:8081"} -@pytest.fixture(name="thread_config_entry") -async def thread_config_entry_fixture(hass): - """Mock Thread config entry.""" +@pytest.fixture(name="otbr_config_entry") +async def otbr_config_entry_fixture(hass): + """Mock Open Thread Border Router config entry.""" config_entry = MockConfigEntry( data=CONFIG_ENTRY_DATA, domain=otbr.DOMAIN, options={}, - title="Thread", + title="Open Thread Border Router", ) config_entry.add_to_hass(hass) with patch("python_otbr_api.OTBR.get_active_dataset_tlvs"): diff --git a/tests/components/otbr/test_config_flow.py b/tests/components/otbr/test_config_flow.py index ab1200f9a14..31e5ce3be9b 100644 --- a/tests/components/otbr/test_config_flow.py +++ b/tests/components/otbr/test_config_flow.py @@ -44,7 +44,7 @@ async def test_user_flow( }, ) assert result["type"] == FlowResultType.CREATE_ENTRY - assert result["title"] == "Thread" + assert result["title"] == "Open Thread Border Router" assert result["data"] == expected_data assert result["options"] == {} assert len(mock_setup_entry.mock_calls) == 1 @@ -52,7 +52,7 @@ async def test_user_flow( config_entry = hass.config_entries.async_entries(otbr.DOMAIN)[0] assert config_entry.data == expected_data assert config_entry.options == {} - assert config_entry.title == "Thread" + assert config_entry.title == "Open Thread Border Router" assert config_entry.unique_id == otbr.DOMAIN @@ -94,7 +94,7 @@ async def test_hassio_discovery_flow(hass: HomeAssistant) -> None: } assert result["type"] == FlowResultType.CREATE_ENTRY - assert result["title"] == "Thread" + assert result["title"] == "Open Thread Border Router" assert result["data"] == expected_data assert result["options"] == {} assert len(mock_setup_entry.mock_calls) == 1 @@ -102,7 +102,7 @@ async def test_hassio_discovery_flow(hass: HomeAssistant) -> None: config_entry = hass.config_entries.async_entries(otbr.DOMAIN)[0] assert config_entry.data == expected_data assert config_entry.options == {} - assert config_entry.title == "Thread" + assert config_entry.title == "Open Thread Border Router" assert config_entry.unique_id == otbr.DOMAIN @@ -116,7 +116,7 @@ async def test_config_flow_single_entry(hass: HomeAssistant, source: str) -> Non data={}, domain=otbr.DOMAIN, options={}, - title="Thread", + title="Open Thread Border Router", ) config_entry.add_to_hass(hass) diff --git a/tests/components/otbr/test_init.py b/tests/components/otbr/test_init.py index 1737feaf655..c31ad274b7b 100644 --- a/tests/components/otbr/test_init.py +++ b/tests/components/otbr/test_init.py @@ -14,7 +14,7 @@ from tests.test_util.aiohttp import AiohttpClientMocker async def test_remove_entry( - hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, thread_config_entry + hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, otbr_config_entry ): """Test async_get_thread_state.""" @@ -30,7 +30,7 @@ async def test_remove_entry( async def test_get_active_dataset_tlvs( - hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, thread_config_entry + hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, otbr_config_entry ): """Test async_get_active_dataset_tlvs.""" @@ -48,7 +48,7 @@ async def test_get_active_dataset_tlvs( async def test_get_active_dataset_tlvs_empty( - hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, thread_config_entry + hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, otbr_config_entry ): """Test async_get_active_dataset_tlvs.""" @@ -64,7 +64,7 @@ async def test_get_active_dataset_tlvs_addon_not_installed(hass: HomeAssistant): async def test_get_active_dataset_tlvs_404( - hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, thread_config_entry + hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, otbr_config_entry ): """Test async_get_active_dataset_tlvs with error.""" @@ -74,7 +74,7 @@ async def test_get_active_dataset_tlvs_404( async def test_get_active_dataset_tlvs_201( - hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, thread_config_entry + hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, otbr_config_entry ): """Test async_get_active_dataset_tlvs with error.""" @@ -84,7 +84,7 @@ async def test_get_active_dataset_tlvs_201( async def test_get_active_dataset_tlvs_invalid( - hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, thread_config_entry + hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, otbr_config_entry ): """Test async_get_active_dataset_tlvs with error.""" diff --git a/tests/components/otbr/test_websocket_api.py b/tests/components/otbr/test_websocket_api.py index c8cbf553115..72eb312aff9 100644 --- a/tests/components/otbr/test_websocket_api.py +++ b/tests/components/otbr/test_websocket_api.py @@ -21,7 +21,7 @@ async def websocket_client(hass, hass_ws_client): async def test_get_info( hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, - thread_config_entry, + otbr_config_entry, websocket_client, ): """Test async_get_info.""" @@ -73,7 +73,7 @@ async def test_get_info_no_entry( async def test_get_info_fetch_fails( hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, - thread_config_entry, + otbr_config_entry, websocket_client, ): """Test async_get_info."""