Improve msg type hint in websocket commands (#80530)
This commit is contained in:
parent
76bd8c431b
commit
5442d6af01
21 changed files with 128 additions and 104 deletions
|
@ -4,6 +4,7 @@ from __future__ import annotations
|
|||
import contextlib
|
||||
from dataclasses import asdict, dataclass
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Any
|
||||
|
||||
import psutil_home_assistant as ha_psutil
|
||||
import voluptuous as vol
|
||||
|
@ -46,7 +47,7 @@ async def async_setup(hass: HomeAssistant) -> None:
|
|||
)
|
||||
@websocket_api.async_response
|
||||
async def ws_info(
|
||||
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict
|
||||
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]
|
||||
) -> None:
|
||||
"""Return hardware info."""
|
||||
hardware_info = []
|
||||
|
@ -72,7 +73,7 @@ async def ws_info(
|
|||
)
|
||||
@websocket_api.async_response
|
||||
async def ws_subscribe_system_status(
|
||||
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict
|
||||
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]
|
||||
):
|
||||
"""Subscribe to system status updates."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue