Here is some more information. The function can't find the dashboard if hide tabs is set to true. It can find the dashboard (and switch to it) if hide tabs is set to false. But, that defeats the whole purpose. I don't want the tabs visible.
I believe you have to publish the workbook with "Show Tabs" selected (or change this in the settings for the workbook), but then embed the workbook with hideTabs: true in the options.