Hey, I have a two part question when it comes to the cloud alexa sync.
I have 100+ devices that have been synced to alexa, is there a way to remove them from alexa? I find going into each one on the alexa app rather tedious and time consuming, is there a bulk way?
And secondly is there a way to prevent new entities from being sync’d by default? I’d rather choose than have every entity automatically selected?
If you go to https://alexa.amazon.com/ and navigate to smart home -> devices, there’s the list of devices you have synced.
If you scroll down at the bottom there is a forget all option.
This will remove all your devices and the next time you hit discover, it will only get the current ones.
Keep in mind that this route, will remove all your devices from alexa and (i think) all the routines you might have set up through alexa, so there’s some extra workload there to re-set them.
Personally i would sort by new, go to all the offline ones and delete them one by one or (i actually did that once) have a simple mouse macro program do it for you
As for the sync by default, im using the cloud.yaml to declare which ones i want shared to alexa (have not used the “new” ui yet) so only the stuff i have in my yaml get synced.
I know this is from last year but I ran into the same problem. I posted my code on Stack Overflow but since i have no rep I fear it will be voted off the island so i’m posting here so someone can benefit from it.
I have a smart devices and had about 300 smart devices attached to Amazon Alexa from Home Assistant that I needed to remove. I couldn’t find a way to click more than one at a time and then confirm each. It was going to take a long time. I couldn’t remove all of them because I had about 15 scattered in there that I needed to keep so I wrote this script to remove them. In my case I removed only ones that mentioned “via Home Assistant” because those are the ones I wanted to remove. Sharing for others who might have this same problem.
Open up developer tools and the console tab(Cmd+option+j on a mac).
Paste the script below and it should remove your devices and automatically confirm the removal.
Please be sure you modify it for your needs as it could delete the wrong ones. This one works to remove all Home Assistant Devices as they are rendered today. I included the html so you could compare if it changes.
Enjoy!
var rows = document.getElementsByTagName('DD');
for (var i = rows.length - 1; i >= 0; i--) {
try {
var row = rows[i];
var title = row.querySelector('.center-left').querySelector('.sub-text');
if (title.innerHTML.indexOf('via Home Assistant') > 0) {
var remove = row.querySelector('.center-right').querySelector('button');
remove.click();
var confirm = document.getElementsByClassName('d-modal-button primary accept');
confirm[0].click();
}
} catch (error) {}
}
I’m guessing the html page will change over time so here is what one of the rows looks like today.
On the weekend, I completely re-installed HA on a fresh Raspi5, because my ancient installation (started 2020) was messed up.
So I wanted a fresh start.
But now I have over 1000 orphan items in alexa, because HA synced all items to Alexa.
Because of the amount of stuff, the alexa app is nearly not usable.
After deleting one old item, it crash or get stuck.
It would take me weeks to delete all the old stuff in this way.
I still have the old Ha installation running and are connected to NabuCase and Alexa and set the “don’t expose entity” option. But this don’t remove the entity from Alexa.
So atm Alexa is not really usable at all for me. You can imagin the mood of the wife in a fully automated home with nearly hundreds of automation, primarily controlled by Alexa. We don’t even have switches on the walls anymore.
The only solution would be to create a fresh Amazon Account, but then I would lose all of my paid stuff.
Normally I don’t would complain because of a hobby project, but the Alexa Integration was the only reason I paid for NabuCase since 3-4 years.
So is there any solution on the horizon to get rid of all the HA entitys in Alexa, after Amazon killed the webpage?
I mean, if there is an API for putting entities to Alexa, there must be a delete api endpoint?