Remove unneeded cast in logbook rest api (#123098)
This commit is contained in:
parent
bb31fc1ec7
commit
61cbb77042
1 changed files with 3 additions and 10 deletions
|
@ -5,7 +5,7 @@ from __future__ import annotations
|
|||
from collections.abc import Callable
|
||||
from datetime import timedelta
|
||||
from http import HTTPStatus
|
||||
from typing import Any, cast
|
||||
from typing import Any
|
||||
|
||||
from aiohttp import web
|
||||
import voluptuous as vol
|
||||
|
@ -109,13 +109,6 @@ class LogbookView(HomeAssistantView):
|
|||
|
||||
def json_events() -> web.Response:
|
||||
"""Fetch events and generate JSON."""
|
||||
return self.json(
|
||||
event_processor.get_events(
|
||||
start_day,
|
||||
end_day,
|
||||
)
|
||||
)
|
||||
return self.json(event_processor.get_events(start_day, end_day))
|
||||
|
||||
return cast(
|
||||
web.Response, await get_instance(hass).async_add_executor_job(json_events)
|
||||
)
|
||||
return await get_instance(hass).async_add_executor_job(json_events)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue