Created
February 25, 2021 22:59
-
-
Save nbogojevic/c41862bcc1a487e9e1c38d9510f1f194 to your computer and use it in GitHub Desktop.
Remove all Home Assistant devices from Alexa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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
Thanks to https://lefkowitz.me/bulk-delete-smartthings-devices-from-alexa/