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

I get always the error:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 537, in handle_manifest_list
    raise int_or_exc
homeassistant.loader.IntegrationNotFound: Integration 'watchman' not found.

But itā€™s not installed.

What can I do?

What are you trying to do? Identify the unavailable spotlight?

I have this report
image

Can the blue be made links or clickable or somehow useful to find the file?

In this case itā€™s wrong, itā€™s from

That would be a question for the maintainer. Oneā€™s config can be structured in many ways: UI-only, which puts it in JSON in internal storage, or various YAML structures.

EDIT: Clarification: Watchman of course works with YAML specifically, so my JSON comment really isnā€™t relevant. I donā€™t know how Watchmanā€™s internals work, but I would image it knows which file it is processing. Creating a local link for a browser seems like a security risk.

I cannot speak to this either, but I exclude ā€œentitiesā€ specified as defaults or in examples.

This is part of custom:auto entities (scroll to bottom for the example).

Iā€™m a bit late to this, but you can also suppress tap_action (albeit nothing happens when you press anyway):

filter:
      template: >-
        {%- for item in
        state_attr("sensor.ha_prod_watchman_missing_entities","entities") -%}
          {{
            {
              'type': "custom:mushroom-template-card",
              'entity': item.id,
              'primary': item.state + ' ' + item.id,
              'secondary': item.occurrences,
              'icon_color': "red" if item.state == "missing" else "orange" if item.state == "unavail" else "yellow",
              'icon': "mdi:cloud-alert" if item.state == "missing" else "mdi:cloud-off-outline" if item.state == "unavail" else "mdi:cloud-question",
              'tap_action': "action: none"
            }
            }},
        {%- endfor -%}

I am pleased to announce that version 0.6.4 has been released and is now available in HACS. Change list is available here: Release v0.6.4 2024-11-23 Ā· dummylabs/thewatchman Ā· GitHub

3 Likes

Urgent Call!

the entities sensor now shows up input_button helpers as unknown state , must fix!

Regards

unknown state of input_button will be ignored in the next version of WM.
Ticket: input_button always reported as unknown Ā· Issue #173 Ā· dummylabs/thewatchman Ā· GitHub

getting false alarms now on templates with this:

          {% set event = vj_marijn %}
          {% set year = 1 if event.month < now().month or
                            (event.month == now().month and event.day < now().day)
                         else 0 %}

Watchman reporting

the latter event is used in

  - id: folder_watcher_config
    mode: queued
    max_exceeded: silent
    triggers:
      - trigger: state
        entity_id: event.folder_watcher_config
        attribute: event_type
        to:
          - created
          - deleted

so seems an oddity too? this one is an actual event, the others are variable names ā€¦ (I could probably fix that using non reserved word thereā€¦)

update

And yes, after renaming the variable names to non reserved words, those disappear from the report;

the folder watcher remains though (it really shouldnt) and the backup mentions are regulars, the integration seems to take a while before those entities are created, I guess I could whitelist those 2. Especially since theyā€™re on the same page as the card for the Backup integration itself :wink:

btw see those state there? theyā€™re also made by that integration ands not correctly translated by the frontend somehowā€¦ device_class playing up there

Right, it seems very similar to date.* issue.

Update: Since events do not have persistent states besides unknown, they should be removed from the watching list. This will be addressed in a future fix. Not sure about date.* yet.
Sorry for the inconvenience.

thx, I did add the info to that issue.

Should I write it up separately?

No, Iā€™ve published a beta 0.7.0 to HACS which should resolve issues with date and event entities.

Trying to run watchman.report, I get an error:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:315
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 07:54:12 (1 occurrences)
Last logged: 07:54:12

[139757406392608] Error handling message: Unable to write report: [Errno 2] No such file or directory: ā€˜ā€™ (home_assistant_error) Jxxxxx Lxxxxx from (IP address) (Mozilla/5.0 (Linux; Android 14; OPD2203 Build/UKQ1.230924.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.107 Safari/537.36 Home Assistant/2024.10.3-14058 (Android 14; OPD2203))

The one thing I see is that the Redacted (IP address) is incorrect.