dummylabs / thewatchman

Home Assistant custom integration to keep track of missing entities and actions in your config files
MIT License
475 stars 20 forks source link

What is the Execution frequency and can it be modified? #145

Closed benquan closed 2 days ago

benquan commented 4 months ago

I have been searching for the execution frequency of the report and possibly a modifiable parameter, but could not find it. Is there an option for this?

dummylabs commented 4 months ago

Hi @benquan , the new report isn’t generated automatically unless you explicitly invoke the service. By setting up an automation, you can run it at your desired frequency. However, Watchman keeps the state of entities from the previous report in memory and can update them automatically when specific events occur so that the missing entities/services sensor shows the actual numbers:

  1. When an entity from the list of previously parsed configuration entities changes its state from unavailable/missing to available or vice versa.
  2. When the user reloads the configuration.
  3. When Home Assistant starts. Hope this helps.
Adavidebaba commented 3 weeks ago

Hi @benquan , the new report isn’t generated automatically unless you explicitly invoke the service. By setting up an automation, you can run it at your desired frequency. However, Watchman keeps the state of entities from the previous report in memory and can update them automatically when specific events occur so that the missing entities/services sensor shows the actual numbers:

  1. When an entity from the list of previously parsed configuration entities changes its state from unavailable/missing to available or vice versa.
  2. When the user reloads the configuration.
  3. When Home Assistant starts. Hope this helps.

Hi Dummylabs, i'm trying to receive a notification whenever a device or a service is missing. I've tried to set up an automation (see sscreenshot) that triggers the creation of the report when the number of devices or services missing changes but it never triggers? Can you help me to make it works? Thanks!!

Screenshot 2024-10-30 alle 18 23 14
dummylabs commented 1 week ago

Hi @benquan,

To trigger this automation, two conditions must be met:

  1. At least one entity or service must change its state to unavailable or unknown while your automation is running.
  2. This entity/service must be referenced in your configuration files (or dashboards) for Watchman to monitor it. This integration does not report missing entities/services that are not used in Home Assistant configuration files or dashboards, as per its intended purpose.