Use the correct OpenThread spelling in the otbr integration name (#188359)

This commit is contained in:
Franck Nijhof
2026-10-24 15:48:08 +02:00
committed by GitHub
parent b6a5e798bd
commit 10762eaa99
11 changed files with 33 additions and 33 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
"""The Open Thread Border Router integration."""
"""The OpenThread Border Router integration."""
import logging
@@ -36,7 +36,7 @@ CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN)
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Open Thread Border Router component."""
"""Set up the OpenThread Border Router component."""
websocket_api.async_setup(hass)
async_register_firmware_info_provider(hass, DOMAIN, homeassistant_hardware)
@@ -45,7 +45,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
async def async_setup_entry(hass: HomeAssistant, entry: OTBRConfigEntry) -> None:
"""Set up an Open Thread Border Router config entry."""
"""Set up an OpenThread Border Router config entry."""
api = python_otbr_api.OTBR(entry.data["url"], async_get_clientsession(hass), 10)
otbrdata = OTBRData(entry.data["url"], api, entry.entry_id)
+3 -3
View File
@@ -1,4 +1,4 @@
"""Config flow for the Open Thread Border Router integration."""
"""Config flow for the OpenThread Border Router integration."""
from contextlib import suppress
import logging
@@ -81,7 +81,7 @@ async def _title(hass: HomeAssistant, discovery_info: HassioServiceInfo) -> str:
class OTBRConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle a config flow for Open Thread Border Router."""
"""Handle a config flow for OpenThread Border Router."""
VERSION = 1
@@ -178,7 +178,7 @@ class OTBRConfigFlow(ConfigFlow, domain=DOMAIN):
else:
await self.async_set_unique_id(border_agent_id.hex())
return self.async_create_entry(
title="Open Thread Border Router",
title="OpenThread Border Router",
data={CONF_URL: url},
)
+1 -1
View File
@@ -1,4 +1,4 @@
"""Constants for the Open Thread Border Router integration."""
"""Constants for the OpenThread Border Router integration."""
DOMAIN = "otbr"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"domain": "otbr",
"name": "Open Thread Border Router",
"name": "OpenThread Border Router",
"after_dependencies": ["hassio", "homeassistant_yellow", "zha"],
"categories": ["hubs_protocols.wireless_protocols"],
"codeowners": ["@home-assistant/core"],
+1 -1
View File
@@ -1,4 +1,4 @@
"""The Open Thread Border Router integration types."""
"""The OpenThread Border Router integration types."""
from homeassistant.config_entries import ConfigEntry
+1 -1
View File
@@ -1,4 +1,4 @@
"""Utility functions for the Open Thread Border Router integration."""
"""Utility functions for the OpenThread Border Router integration."""
from collections.abc import Callable, Coroutine
import dataclasses
+1 -1
View File
@@ -8364,7 +8364,7 @@
"iot_class": "local_polling"
},
"otbr": {
"name": "Open Thread Border Router",
"name": "OpenThread Border Router",
"integration_type": "service",
"categories": [
"hubs_protocols.wireless_protocols"
+1 -1
View File
@@ -1,4 +1,4 @@
"""Tests for the Open Thread Border Router integration."""
"""Tests for the OpenThread Border Router integration."""
BASE_URL = "http://core-silabs-multiprotocol:8081"
CONFIG_ENTRY_DATA_MULTIPAN = {"url": "http://core-silabs-multiprotocol:8081"}
+5 -5
View File
@@ -1,4 +1,4 @@
"""Test fixtures for the Open Thread Border Router integration."""
"""Test fixtures for the OpenThread Border Router integration."""
from collections.abc import Generator
from http import HTTPStatus
@@ -114,12 +114,12 @@ async def otbr_config_entry_multipan_fixture(
get_extended_address: AsyncMock,
get_coprocessor_version: AsyncMock,
) -> str:
"""Mock Open Thread Border Router config entry."""
"""Mock OpenThread Border Router config entry."""
config_entry = MockConfigEntry(
data=CONFIG_ENTRY_DATA_MULTIPAN,
domain=otbr.DOMAIN,
options={},
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=TEST_BORDER_AGENT_EXTENDED_ADDRESS.hex(),
)
config_entry.add_to_hass(hass)
@@ -135,12 +135,12 @@ async def otbr_config_entry_thread_fixture(
get_extended_address: AsyncMock,
get_coprocessor_version: AsyncMock,
) -> None:
"""Mock Open Thread Border Router config entry."""
"""Mock OpenThread Border Router config entry."""
config_entry = MockConfigEntry(
data=CONFIG_ENTRY_DATA_THREAD,
domain=otbr.DOMAIN,
options={},
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=TEST_BORDER_AGENT_EXTENDED_ADDRESS.hex(),
)
config_entry.add_to_hass(hass)
+14 -14
View File
@@ -1,4 +1,4 @@
"""Test the Open Thread Border Router config flow."""
"""Test the OpenThread Border Router config flow."""
import asyncio
from http import HTTPStatus
@@ -132,7 +132,7 @@ async def test_user_flow_additional_entry(
data={"url": url2},
domain=otbr.DOMAIN,
options={},
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=TEST_BORDER_AGENT_ID_2.hex(),
)
config_entry.add_to_hass(hass)
@@ -168,7 +168,7 @@ async def test_user_flow_additional_entry_fail_get_address(
data={"url": url2},
domain=otbr.DOMAIN,
options={},
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=TEST_BORDER_AGENT_ID_2.hex(),
)
config_entry.add_to_hass(hass)
@@ -208,7 +208,7 @@ async def _finish_user_flow(
},
)
assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["title"] == "Open Thread Border Router"
assert result["title"] == "OpenThread Border Router"
assert result["data"] == expected_data
assert result["options"] == {}
assert len(mock_setup_entry.mock_calls) == 1
@@ -216,7 +216,7 @@ async def _finish_user_flow(
config_entry = result["result"]
assert config_entry.data == expected_data
assert config_entry.options == {}
assert config_entry.title == "Open Thread Border Router"
assert config_entry.title == "OpenThread Border Router"
assert config_entry.unique_id == TEST_BORDER_AGENT_ID.hex()
@@ -238,7 +238,7 @@ async def test_user_flow_additional_entry_same_address(
data={"url": "http://custom_url:1234"},
domain=otbr.DOMAIN,
options={},
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=TEST_BORDER_AGENT_ID.hex(),
)
config_entry.add_to_hass(hass)
@@ -333,7 +333,7 @@ async def test_user_flow_router_not_setup(
}
assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["title"] == "Open Thread Border Router"
assert result["title"] == "OpenThread Border Router"
assert result["data"] == expected_data
assert result["options"] == {}
assert len(mock_setup_entry.mock_calls) == 1
@@ -341,7 +341,7 @@ async def test_user_flow_router_not_setup(
config_entry = hass.config_entries.async_entries(otbr.DOMAIN)[0]
assert config_entry.data == expected_data
assert config_entry.options == {}
assert config_entry.title == "Open Thread Border Router"
assert config_entry.title == "OpenThread Border Router"
assert config_entry.unique_id == TEST_BORDER_AGENT_ID.hex()
@@ -987,7 +987,7 @@ async def test_hassio_discovery_flow_updates_entry(
domain=otbr.DOMAIN,
options={},
source="hassio",
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=entry_unique_id,
)
config_entry.add_to_hass(hass)
@@ -1030,7 +1030,7 @@ async def test_hassio_discovery_flow_entry_without_unique_id_kept(
domain=otbr.DOMAIN,
options={},
source="hassio",
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=None,
)
legacy_entry.add_to_hass(hass)
@@ -1039,7 +1039,7 @@ async def test_hassio_discovery_flow_entry_without_unique_id_kept(
domain=otbr.DOMAIN,
options={},
source="hassio",
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=HASSIO_DATA.uuid,
)
config_entry.add_to_hass(hass)
@@ -1075,7 +1075,7 @@ async def test_hassio_discovery_flow_new_port_other_addon(hass: HomeAssistant) -
domain=otbr.DOMAIN,
options={},
source="hassio",
title="Open Thread Border Router",
title="OpenThread Border Router",
)
config_entry.add_to_hass(hass)
@@ -1127,7 +1127,7 @@ async def test_hassio_discovery_flow_addon_restarted_entry_not_loaded(
domain=otbr.DOMAIN,
options={},
source="hassio",
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=HASSIO_DATA.uuid,
)
config_entry.add_to_hass(hass)
@@ -1173,7 +1173,7 @@ async def test_config_flow_additional_entry(
data={},
domain=otbr.DOMAIN,
options={},
title="Open Thread Border Router",
title="OpenThread Border Router",
)
config_entry.add_to_hass(hass)
+2 -2
View File
@@ -1,4 +1,4 @@
"""Test the Open Thread Border Router integration."""
"""Test the OpenThread Border Router integration."""
import asyncio
from typing import Any
@@ -383,7 +383,7 @@ async def test_update_unique_id(
domain=otbr.DOMAIN,
options={},
source=source,
title="Open Thread Border Router",
title="OpenThread Border Router",
unique_id=unique_id,
)
config_entry.add_to_hass(hass)