Add statistics meta data table (#52331)

* Add statistics meta data table

* Tweak meta data generation
This commit is contained in:
Erik Montnemery 2021-06-30 13:32:17 +02:00 committed by GitHub
parent d8337cf98f
commit 0ab999738b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 126 additions and 25 deletions

View file

@ -173,12 +173,12 @@ async def ws_get_list_statistic_ids(
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict
) -> None:
"""Fetch a list of available statistic_id."""
statistics = await hass.async_add_executor_job(
statistic_ids = await hass.async_add_executor_job(
list_statistic_ids,
hass,
msg.get("statistic_type"),
)
connection.send_result(msg["id"], {"statistic_ids": statistics})
connection.send_result(msg["id"], statistic_ids)
class HistoryPeriodView(HomeAssistantView):