Remove async_response from websocket apis where nothing was being awaited (#90204)
This commit is contained in:
parent
d49fbc17df
commit
e7e7f603c2
2 changed files with 6 additions and 6 deletions
|
@ -27,9 +27,9 @@ def async_load_websocket_api(hass: HomeAssistant) -> None:
|
||||||
websocket_api.async_register_command(hass, handle_module_log_level)
|
websocket_api.async_register_command(hass, handle_module_log_level)
|
||||||
|
|
||||||
|
|
||||||
|
@callback
|
||||||
@websocket_api.websocket_command({vol.Required("type"): "logger/log_info"})
|
@websocket_api.websocket_command({vol.Required("type"): "logger/log_info"})
|
||||||
@websocket_api.async_response
|
def handle_integration_log_info(
|
||||||
async def handle_integration_log_info(
|
|
||||||
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
|
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handle integrations logger info."""
|
"""Handle integrations logger info."""
|
||||||
|
|
|
@ -399,9 +399,9 @@ async def handle_manifest_get(
|
||||||
connection.send_error(msg["id"], const.ERR_NOT_FOUND, "Integration not found")
|
connection.send_error(msg["id"], const.ERR_NOT_FOUND, "Integration not found")
|
||||||
|
|
||||||
|
|
||||||
|
@callback
|
||||||
@decorators.websocket_command({vol.Required("type"): "integration/setup_info"})
|
@decorators.websocket_command({vol.Required("type"): "integration/setup_info"})
|
||||||
@decorators.async_response
|
def handle_integration_setup_info(
|
||||||
async def handle_integration_setup_info(
|
|
||||||
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
|
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handle integrations command."""
|
"""Handle integrations command."""
|
||||||
|
@ -648,6 +648,7 @@ async def handle_execute_script(
|
||||||
connection.send_result(msg["id"], {"context": context})
|
connection.send_result(msg["id"], {"context": context})
|
||||||
|
|
||||||
|
|
||||||
|
@callback
|
||||||
@decorators.websocket_command(
|
@decorators.websocket_command(
|
||||||
{
|
{
|
||||||
vol.Required("type"): "fire_event",
|
vol.Required("type"): "fire_event",
|
||||||
|
@ -656,8 +657,7 @@ async def handle_execute_script(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@decorators.require_admin
|
@decorators.require_admin
|
||||||
@decorators.async_response
|
def handle_fire_event(
|
||||||
async def handle_fire_event(
|
|
||||||
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
|
hass: HomeAssistant, connection: ActiveConnection, msg: dict[str, Any]
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Handle fire event command."""
|
"""Handle fire event command."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue