forked from home-assistant/core
Adjust recorder validate_statistics handler (#139229)
This commit is contained in:
@@ -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(
|
||||||
|
Reference in New Issue
Block a user