Add websocket type hints in components (#80654)

* Add websocket type hints in components

* Adjust

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This commit is contained in:
epenet 2022-10-20 13:41:14 +02:00 committed by GitHub
parent ae7eb9cef9
commit 2c43606922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 116 additions and 40 deletions

View file

@ -689,7 +689,11 @@ async def thingtalk_convert(
@websocket_api.websocket_command({"type": "cloud/tts/info"})
def tts_info(hass, connection, msg):
def tts_info(
hass: HomeAssistant,
connection: websocket_api.ActiveConnection,
msg: dict[str, Any],
) -> None:
"""Fetch available tts info."""
connection.send_result(
msg["id"], {"languages": [(lang, gender.value) for lang, gender in MAP_VOICE]}