thewatchman icon indicating copy to clipboard operation
thewatchman copied to clipboard

Look for unused dashboard resources

Open Reynders1 opened this issue 3 years ago • 6 comments
trafficstars

Hi,

Would it be possible to add a function to look for unused dashboard resources? After a while, the configuration may become messy with a lot of unused resources. Thanks.

Reynders1 avatar Oct 01 '22 15:10 Reynders1

Duplicate of #26

dummylabs avatar Oct 13 '22 11:10 dummylabs

Thanks. I’ll give it a try.

Christian Reynders On 13. Oct 2022 at 13:53 +0200, dummylabs @.***>, wrote:

Duplicate of #26 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Reynders1 avatar Oct 13 '22 15:10 Reynders1

Hi,

I tried it and is not addressing what I was suggesting. The test I did is the following:

• Install any frontend from HACS and add it to your resources • Don’t use this frontend • Run watchman report

My suggestion was that frontend would appear on the report as an unused resource. This is not the case.

Did I miss a something?

Christian Reynders On 13. Oct 2022, 17:15 +0200, Christian Reynders @.***>, wrote:

Thanks. I’ll give it a try.

Christian Reynders On 13. Oct 2022 at 13:53 +0200, dummylabs @.***>, wrote:

Duplicate of #26 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Reynders1 avatar Oct 14 '22 11:10 Reynders1

Ah, sorry, I've misread term "resources" here, your idea sounds good for me! It seems like a feasible feature, at least for the resources, which call customElements.define() to register a custom dashboard element. That is, this will not work for stuff like custom themes and icons. I'll move it to the enhancements category.

dummylabs avatar Oct 14 '22 13:10 dummylabs

Great! Thanks.

Reynders1 avatar Oct 14 '22 13:10 Reynders1

I'm not sure if my problem is different from or a subset of this issue. I want to know if my dashboard has errors on it. The way I use Watchman to help with this is:

  • open the dashboard menu and use the "raw configuration editor" option
  • copy and paste the entire text contents into an empty file which I save as /config/lovelace.yaml
  • run Watchman and pick up errors The outcome is something like: image It would be neat to be able to get this report automatically.

PhillyGilly avatar Jan 03 '23 16:01 PhillyGilly