Convert hardware system status websocket api to a normal function (#111172)

* Convert hardware system status websocket api to a normal function

Nothing is awaited here

* tweak
This commit is contained in:
J. Nick Koston 2024-02-23 00:48:13 -10:00 committed by GitHub
parent 87fed65fb3
commit 70d7f74f35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,13 +66,13 @@ async def ws_info(
connection.send_result(msg["id"], {"hardware": hardware_info}) connection.send_result(msg["id"], {"hardware": hardware_info})
@callback
@websocket_api.websocket_command( @websocket_api.websocket_command(
{ {
vol.Required("type"): "hardware/subscribe_system_status", vol.Required("type"): "hardware/subscribe_system_status",
} }
) )
@websocket_api.async_response def ws_subscribe_system_status(
async def ws_subscribe_system_status(
hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any] hass: HomeAssistant, connection: websocket_api.ActiveConnection, msg: dict[str, Any]
) -> None: ) -> None:
"""Subscribe to system status updates.""" """Subscribe to system status updates."""