One websocket command to HA: connect, authenticate with token, send command, return its result, close. For what HA only offers over the websocket (auth/current_user, config/auth/list).
token
command
auth/current_user
config/auth/list
@spec call(String.t(), map()) :: {:ok, term()} | {:error, term()}