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:
parent
ae7eb9cef9
commit
2c43606922
16 changed files with 116 additions and 40 deletions
|
@ -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]}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue