duittenb
(Dirk)
April 17, 2022, 2:46pm
1
Team,
My RFXTRX was set to “Auto discover” resulting in >1,700 smoke detector devices with 8,500 entities.
Deleting these through the normal device GUI would take too long.
UPDATE 2023: I created an Applescript that removes devices by doing mouse-clicks : Can't remove 100's of RFXTRX devices - delete grayed out - #6 by duittenb
So I thought about deleting them through these files in the /config/.storage/
folder:
core.entity_registry
core.device_registry
core.restore_state
I created a Python script that removes entries containing “RM174RF” from each of these files.
Steps:
ha core stop
backup 3 files
run script
core start
After HA startup completed both the core.entity_registry
and core.device_registry
contained the entries I just removed??
How can these items re-appear in these 2 files?
Are they also stored somewhere else?
Cheers!
DJ
I have the same question, did you manage to solve this?
duittenb
(Dirk)
February 15, 2023, 12:02pm
3
Hello @benganellison
Check out this post. I created an Applescript (only working on a Mac) that automates clicks to remove the devices.
Tobias,
Sorry for the delay. I had to re-prioritize my ‘home automation’ time to help out friends.
Here’s the script:
# DJ: Script to remove 1700 devices from HomeAssistant
# batch_count = batch size. Start small, then increase. At the end I used batches of 250
set batch_count to 1
set myDelay to 0.5
# myUrl = Is the browser still is on the right page? (security)
set myUrl to "http://your_hs_ip:8123/config/devices/dashboard"
# COORDINATE: select device
set item_sel to "780,485"
# COORDINATE: …
For windows you might be able to find similar software.
So far it’s the only solution I found.
Now I want to create something that shows the entity count for the RFXTRX integration and notify me if there’s > 100.