mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Remove unneeded cast in logbook rest api (#123098)
This commit is contained in:
parent
bb31fc1ec7
commit
61cbb77042
@ -5,7 +5,7 @@ from __future__ import annotations
|
|||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any, cast
|
from typing import Any
|
||||||
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
@ -109,13 +109,6 @@ class LogbookView(HomeAssistantView):
|
|||||||
|
|
||||||
def json_events() -> web.Response:
|
def json_events() -> web.Response:
|
||||||
"""Fetch events and generate JSON."""
|
"""Fetch events and generate JSON."""
|
||||||
return self.json(
|
return self.json(event_processor.get_events(start_day, end_day))
|
||||||
event_processor.get_events(
|
|
||||||
start_day,
|
|
||||||
end_day,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
return cast(
|
return await get_instance(hass).async_add_executor_job(json_events)
|
||||||
web.Response, await get_instance(hass).async_add_executor_job(json_events)
|
|
||||||
)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user