mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Include pending_components in WS command get_config
This commit is contained in:
parent
c0e8f14745
commit
6d082a87a4
@ -59,7 +59,11 @@ from homeassistant.loader import (
|
|||||||
async_get_integration_descriptions,
|
async_get_integration_descriptions,
|
||||||
async_get_integrations,
|
async_get_integrations,
|
||||||
)
|
)
|
||||||
from homeassistant.setup import async_get_loaded_integrations, async_get_setup_timings
|
from homeassistant.setup import (
|
||||||
|
DATA_SETUP_DONE,
|
||||||
|
async_get_loaded_integrations,
|
||||||
|
async_get_setup_timings,
|
||||||
|
)
|
||||||
from homeassistant.util.json import format_unserializable_data
|
from homeassistant.util.json import format_unserializable_data
|
||||||
|
|
||||||
from . import const, decorators, messages
|
from . import const, decorators, messages
|
||||||
@ -517,7 +521,9 @@ def handle_get_config(
|
|||||||
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
|
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handle get config command."""
|
"""Handle get config command."""
|
||||||
connection.send_result(msg["id"], hass.config.as_dict())
|
config_dict = hass.config.as_dict()
|
||||||
|
config_dict["pending_components"] = list(hass.data.get(DATA_SETUP_DONE, []))
|
||||||
|
connection.send_result(msg["id"], config_dict)
|
||||||
|
|
||||||
|
|
||||||
@decorators.websocket_command(
|
@decorators.websocket_command(
|
||||||
|
@ -732,7 +732,7 @@ async def test_get_config(
|
|||||||
result[key] = set(result[key])
|
result[key] = set(result[key])
|
||||||
config[key] = set(config[key])
|
config[key] = set(config[key])
|
||||||
|
|
||||||
assert result == config
|
assert result == config | {"pending_components": []}
|
||||||
|
|
||||||
|
|
||||||
async def test_ping(websocket_client: MockHAClientWebSocket) -> None:
|
async def test_ping(websocket_client: MockHAClientWebSocket) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user