šŸ›” Watchman - keeps track of missing entities and services in your config files

Yes, installing an HASS update did it for me. I guess this cleared the cash of the browser I guess. Other advice I got was to clear the cash.

That totally makes sense, thanks for idea! Iā€™ve added a ticket for this to the backlog.

The report should contain exact file name and line number where missing entry was found. These lovelace files are not intended for manual change, theyā€™re basically json files used by the dashboard (ex-Lovelace) editor. Nevertheless, review of them may help to figure out which part of dashboard the missing entity belongs to.

The only idea I have is that report was created at the point in time when initialisation of some services/entities was not yet finished (e.g. after HA restart). This is especially true for integrations which are loaded asynchronously by HA, that is, the entities/services they provide become available after some delay. To validate this you can run the report once again and check the result.

Not yet.

Yes, check ā€œReportā€™s columns witdthā€ settings.

I was thinking about hyperlinks to a file in the report. It seems that it should be somehow supported by the tool (file editor) used by the user. So far I see no portable solution.

1 Like

@scr That would make total sense however re-running the report just now had the same results and HA has been running for a couple of hours since my last restart.

Any plans to check the Node red flows.json file?
Since itā€™s JSON it should be easy to work with.

Can you please check whatā€™s the state of media_player and scene entities in HA Developer tools? it always a good idea to copy/paste entity name from the report to ā€œFilter entitiesā€ field to avoid encoding/typing mismatch.

State unknown means that HA returned ā€œunknownā€ for this entity to watchman and this is a correct state. It can be that Fully Kiosk makes this entity unknown when corresponding tablet is offline or the application is not active, but the Developer tools should show the actual state anyway.

The same check can be made for the service, try to type ā€œfloorā€ in the Service tab from the Developer tools to check if this service is shown as a suggestion.

I am not using NR addon, is this flows.json file stored somewhere under /config directory?

Yes.

/config/node-red/flows.json

Do you need a sample file?

Oh checking Node-Red Flows also would be amazing! +1 for that :wink:

Yes, please create a ticket on the github with a sample file attached. Thank you!

I love this service. Can you tell us what interval will be for the 2 sensors?
I add both markdown examples and wondering if those sensors will renew every x minutes.

And what is the benefit to check check_lovelace?
Because the stored Lovelace have many old entities that are not there anymore.
And the stored one is not accurate on the one that is used.

Not sure what you mean by this.

If you edit a Dashboard or card (HA is moving away from the name ā€œLovelaceā€, rightly or wrongly) via the UI as soon as you save it the json in the .storage register is updated.

If you use yaml mode the register is update as soon as you do a reload.

I edit the dashboard and then save it. When I check it I see lot.of old entities that are not used anymore in the running dashboard.

HA is not updating the file thenā€¦?

I just used the check Lovelace option (Iā€™ve never used it before) and all it found were entities that really donā€™t exist any more (thanks scr!).

EDIT: ok, after removing or editing the offending entities from my Lovelace raw config, saving and then running another Watchman report I still got the same entities being reported. I had to re-parse the configuration to get them out of the report. Itā€™s this option:

Iā€™m guessing this is only done automatically after a restart.

1 Like

Good point, current version cannot automatically detect changes made to Dashboard UI (ex-Lovelace UI), only changes to yaml files are tracked and will trigger re-parsing. Iā€™ll check if there is a relevant event which can be catched by watchman.

1 Like

Watchman sensors are automatically updated when any entity from the monitoring list changes its state either from or to missing, unavailable or unknown. Monitoring list contains all entities from all configuration files except:

  • entities, which have a state from ignored_states list
  • entities, which name is a part of ignored_items list
  • entities, which referenced by a file from the ignored_files list

Update: missing is an artificial state, which doesnā€™t exist in HA. It simply means that this entity was not found in HA registry.

1 Like

I installed watchman using HACS but I canā€™t find the watchman.report service in the services list. Everything is up to date here. What am I missing?