How to find where something is used

Simpel question : is it possible to search where an entity or script or even some string is used in HA ?

I guess it depends on how you edit your configuration files.

I write almost everything yaml and use Notepad++ as my text editor so it’s very easy to do a “find in files” and enter the search string.

I would assume most text editors provide some sort of search capability and even UI configured code is written in plain text in the storage directory (even if it could be xml).

Sorry for my late reaction.

Let say I have a script ‘Switch : Rolluik’. This script has an entity name ‘script.switch_rolluik’.

Now I want f.e. to rename it to ‘aaa : Rolluik’. I duplicate my old script and give it that name (and delete the old one). The new script has now an entity name ‘script.aaa_rolluik’.

With my text editor I open these files and do a find & replace :

  • automatisations.yaml
  • scripts.yaml
  • templates.yaml

Other files (don’t know where the dashboards are stored ?) ?

The example is a script, but it could also been a helper or other entity.

And my initial question was in fact if there was not a tool to do this for the whole HA files.

nothing built-in.

if you use the ui to manage your dashboards then those are all stored in the .storage folder files. And those files are not meant to be user editable. I’m not aware of another way of doing it other than manually editing the dashboards.

That’s what I thought
But hey, if you don’t ask, you don’t win :wink:

Thank you !

1 Like