Why is an automation trigger not a logbook event?

Hi

I have a question which could become a feature request.

I have quite a large number of automations which I call watchdogs to keep unusual situations under control. To give an example: I have a watchdog to check if a pump is running against a closed valve. If it is it will stop the pump. The trigger could be flow, pressure or temperature. I have about 20 of these watchdogs monitoring unwanted situations with a corrective action (rebooting the router when connectivity is low). All in all no rocket science.

Here comes my question: I created a logbook card with all watchdogs to learn from the “events” when a watchdog is triggered. However the logbook stays empty because the triggering of an automation is not a logbook event. WHY IS THAT?

I think It would be helpful if trigger time and eventually the trigger ends up the logbook like:
“automation_XX triggered at 13:34:23 by sensor.xyz_temperature”.

I do know about the “trace” functionality but then you are already in debugging mode. I like to have a logbook on it.

So is this a potential feature or does it exist and I have just missed out on it??

Automation triggers do create events and are shown in the logbook:

Screenshot 2023-06-16 at 08-44-47 Logbook – Home Assistant

Do you have any excludes defined for either the recorder or logbook?

Do you see the automation triggers in your Home Assistant logbook (in which case it is an issue with the card)?

Some great hints! Let me check the issues mentioned and I come back to it!

Thanks!

Edit: These are my recorder excludes. I don’t see an issue with those…

  exclude:
    domains:
      - mobile_app
    entity_globs:
      - sensor.openweathermap_*
      - sensor.1000*
      - switch.1000*
      - device_tracker.*
      - sensor.disk_*
      - sensor.memory_*
      - sensor.*_rssi

Wrt the logbook I didn’t change anything in my config.yaml and running fully on default (no in- or excludes).

I checked the standard logbook but no references to my watchdog automations…

This is my logbook card:

type: logbook
entities:
  - automation.garage_door_guard
  - automation.heat_pump_watchdog
  - automation.watchdog_thermostats_boiler_floor_heating
  - automation.stop_booster_pump_when_tank_valve_closed
  - automation.stop_booster_pump_when_tank_valve_is_closed
  - automation.watchdog_dry_running_booster_pump
  - automation.watchdog_reload_huawei_integration
  - automation.remote_ui_watchdog
  - automation.watchdog_anti_freeze_solar_panels_pool
  - automation.watchdog_pool_pump
  - automation.watchdog_camera_garage
  - automation.watchdog_camera_living
  - automation.watchdog_camera_pool_house
  - automation.watchdog_camera_utilities
  - automation.watchdog_lte_band_1
  - automation.watchdog_valve_failure_east_side
  - automation.watchdog_valve_failure_front_side
  - automation.watchdog_valve_failure_pool_side
  - automation.watchdog_rgb01
  - automation.watchdog_rgb02_switch_off
title: Watchdogs
hours_to_show: 24

Also here I can’t see abnormalities. Especially since I use similar cards for other non automation entities without issues.

Finally I checked my standard HA logbook and I checked an automation which has been running but did not show any returns either:

hmmm…

I now added - automation to my Recorder includes list.

recorder:
  purge_keep_days: 30
  auto_purge: true
  commit_interval: 60
  include:
    domains:
      - sensor
      - binary_sensor
      - switch
      - light
      - input_number
      - schedule
      - automation

Still nothing…

Stating the obvious, but you have to have one of your watchdog triggered after the recorder change for it to be logged…

True. After adding the automation to the include list it started giving results!!

Thank you guys! :pray::smiley:

Please set Tom’s answer as the actual solution :wink:

Done!! Again thanks!!