Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sunnydsouza/f1819f9c0cbdcfd571a66405ccd85ad6 to your computer and use it in GitHub Desktop.
Save sunnydsouza/f1819f9c0cbdcfd571a66405ccd85ad6 to your computer and use it in GitHub Desktop.
Remove all Home Assistant devices from Alexa
// Paste in development console
$x('//div[contains(text(), "Home Assistant")]')
.map((innerDiv) => innerDiv.parentNode.parentNode)
.map((parentDiv) => parentDiv.getElementsByTagName("button")[0])
.forEach((button) => {
fetch(
`https://alexa.amazon.fr/api/phoenix/appliance/${encodeURIComponent(button.getAttribute(
"appliance-id"
))}`,
{
method: "DELETE",
}
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment