How to text search an entire dashboard config?

I am using the amazing spook, and have cleaned up many issues. Spook identified the following issue (it’s not a problem with spook!)

I am struggling with one last repair that spook has flagged. This is “Unknown entities used in: Main Views”. It then lists 35 entities that are apparently used somewhere in this dashboard.

This dashboard consists of 35 views. Many of these views contain complex markdown cards with hundreds of lines of conditional code. My problem is searching these 35 views for each of the 35 entities. I have already removed the obvious ones, but the remaining 35 are elusive. I was hoping to find a text search capability to look for these. I have looked at the Raw configuration editor (from the dashboard editing function) but it can’t locate any of them. I tried the search function in the studio code server - no luck either. These 35 entities are all old. They existed at one point but have been removed over the years.

I’d really like to clean them up. I could of course copy each individual view to a separate dashboard and see if spook identifies the entities there - but that would be painful for 35 entities * 35 views. I could open every single card in every single view - but also a long approach when maybe there is a faster way to find these?

Here is a sample of one of my views:

Thoughts?

Is there some way I could narrow down this search from information in the log files perhaps?

Thanks!

Click the three dots.
Edit dashboard.
Click the three dots again.
Raw configuration editor

Thanks for the suggestion, unfortunately that was unsuccessful. As I mentioned in my post above:

“I have looked at the Raw configuration editor (from the dashboard editing function) but it can’t locate any of them. I tried the search function in the studio code server - no luck either.”

Appreciate the suggestion though!

1 Like

You can use VSC, but only real client with connection to smb share add-on. VSC add-on does not allow to search through hidden folders (I think, but might be wrong). Then you can search entire HA disk, including hidden .storage, where dashboards are stored. Here is example of search results fopr sensor.mirek found in development dashboard (config\storage\lovelace.dashboard_development file):

Be aware, however, that dashboards are stored as JSON files, not YAML, so modification might be more complex. But at least it should allow you to find the proper dashboard that generates error.

If a dashboard is “storage mode” - then you can check it’s content in “Raw yaml configuration” as you mentioned. Using VSCode or similar to check a corresponding json file will give same result (but less convenient).
I never worked with Spook. There is a custom Watchman integration which also scans files and report something similar like “this entity does not exist”. But sometimes it gives false results, each found entry should be checked manually.
Is it possible that Spook found entities which are stored in “entity registry”?

Thankyou everyone for the suggestions. In the end this was “dumb user error”. While I kept trying to use the raw configuration editor, I was not clicking in the text before doing the ctrl-F. I assumed that the text had the focus when I went into the editor - bad assumption! Once I clicked in the text, ctrl-f worked properly.

Ctrl-f without first clicking in the text did open a text box to allow you to enter the search string - but it didn’t search the text being editing.

Live and Learn.

thanks!