thewatchman icon indicating copy to clipboard operation
thewatchman copied to clipboard

Feature request - Know where an entity or service is used -

Open RASBR opened this issue 1 year ago • 9 comments

Hello, This is really great, but I think it would be even greater if the user can use it to know where an entity or service is used?

Thank you R.S

RASBR avatar Nov 19 '22 06:11 RASBR

If you add the Lovelace card to your UI you can hover over the file name where an orphaned entity is located and the pop-up will even show the line number in the file. Or is that not what you are looking for?

filmgarage avatar Feb 05 '23 22:02 filmgarage

Here is an example:

Scherm­afbeelding 2023-02-05 om 23 38 33

Hovering your mouse over the word automations.yaml shows this entity was referenced on the lines 1774, 1781, 1791 and 1804 in automations.yaml

filmgarage avatar Feb 05 '23 22:02 filmgarage

I didn't pause the mouse over before, this is really helpful.

Thank you very much. R.S.

RASBR avatar Feb 06 '23 05:02 RASBR

How to "hover" on touch devices like smartphones by the way 😀

bcutter avatar Feb 06 '23 10:02 bcutter

You can hover as long as you like, but nothing will happen I'm afraid... 😂

filmgarage avatar Feb 06 '23 10:02 filmgarage

For sure. That's why building UI relying on features only available on a certain type of devices is... oldschool 😎

bcutter avatar Feb 06 '23 10:02 bcutter

You may want to file a feature request to make these file names "clickable" and show the line number. Personally I prefer repairing these issues on my laptop anyway. It's too cumbersome on my mobile.

filmgarage avatar Feb 06 '23 10:02 filmgarage

Line numbers are nice, but do not help a "GUI" only user. Would it be possible to show the name of the automation that is containing the troublemaker?

ProfDrYoMan avatar Feb 06 '23 12:02 ProfDrYoMan

I came across this in the readme section:

"4. To display line numbers in the report just remove .split(':')[0] from the card template"

If you do so you don't have to hover over the file name anymore.

filmgarage avatar Feb 10 '23 09:02 filmgarage