mirror of
https://github.com/home-assistant/core.git
synced 2026-09-08 02:35:02 -05:00
Remove unneeded cast in logbook rest api (#123098)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user