Add websocket type hints in components (#80533)
This commit is contained in:
parent
eca45f9dd0
commit
60640b4436
5 changed files with 99 additions and 20 deletions
|
@ -195,7 +195,11 @@ def websocket_list(hass, connection, msg):
|
|||
}
|
||||
)
|
||||
@websocket_api.async_response
|
||||
async def websocket_handle(hass, connection, msg):
|
||||
async def websocket_handle(
|
||||
hass: HomeAssistant,
|
||||
connection: websocket_api.ActiveConnection,
|
||||
msg: dict[str, Any],
|
||||
) -> None:
|
||||
"""Handle an incoming webhook via the WS API."""
|
||||
request = MockRequest(
|
||||
content=msg["body"].encode("utf-8"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue