mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Adjust recorder validate_statistics handler (#139229)
This commit is contained in:
parent
df6a5d7459
commit
fd47d6578e
@ -297,13 +297,13 @@ async def ws_list_statistic_ids(
|
|||||||
async def ws_validate_statistics(
|
async def ws_validate_statistics(
|
||||||
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]
|
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Fetch a list of available statistic_id."""
|
"""Validate statistics and return issues found."""
|
||||||
instance = get_instance(hass)
|
instance = get_instance(hass)
|
||||||
statistic_ids = await instance.async_add_executor_job(
|
validation_issues = await instance.async_add_executor_job(
|
||||||
validate_statistics,
|
validate_statistics,
|
||||||
hass,
|
hass,
|
||||||
)
|
)
|
||||||
connection.send_result(msg["id"], statistic_ids)
|
connection.send_result(msg["id"], validation_issues)
|
||||||
|
|
||||||
|
|
||||||
@websocket_api.websocket_command(
|
@websocket_api.websocket_command(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user