How to determine where entity is used?

I have an entity named input_boolean.light_switch. I’m trying to determine where this entity us used, e.g., automations, scripts, etc. In my /config directly it only shows up in one file:

homeassistant:~# grep -lis input_boolean.light_switch *
home-assistant_v2.db

So I installed the Sqlite-Web app but I don’t see how to query home-assistant_v2.db. Or whether this is the best way to find all instances of input_boolean.light_switch. Is it possible to find all instances of this entity?

-Thanks

search for the entity, then click the 3 dots in the top right and click related it will give you all the automations and scripts it is used in.

You want to -R (recurse) that.

Well that was easy! Thank you!

I recursed it and that’s still the only file it shows up in. It’s in a table in there somewhere!

homeassistant:~# grep -Rlis input_boolean.light_switch *
home-assistant_v2.db

-Thanks

if you want to not miss the use of the input_boolean in your lovelace dashboard cards replace the last
*
with
* .[^.]
since then the hidden “.storage” folder is also taken into account. (where the dashboards config files are kept)
Something I really miss from the inbuild “related” functionality, where you wipe things since not being related to anything while this won’t mean it’s only relation is with in a lovelace card. Which then results in a broken card until you found the entities definition in one of your backups.

And don’t give too much about the findings in the core.* files which will also be listed since these do contain a section “deleted_entities” means even if it’s gone (removed/deleted) it might still be listed in there since once known.

Thanks for the info!