Integrations

System log

Spook adds an action that lists the errors and warnings of Home Assistant, the ones on the logs page, so an automation can count them, filter them by integration, or send them to your phone.

The system log integration keeps the errors and warnings of Home Assistant. They are the ones on the logs page, under Settings > System > Logs: each one once, with how often it happened, and when it last did.

Only that page shows them. An automation cannot see what is in there: not to tell you when an integration starts throwing errors, not to put the count on a dashboard. Spook adds an action for that: list the errors and warnings.

Actions

Spook adds one action to the system log integration. You find it wherever you add an action, marked with a 👻.

List errors and warnings

Lists the errors and warnings, the most recent first: what was logged, the integration it is about, how often it happened, and when it first and last did. The same ones the logs page shows.

Ask for only errors, or only the ones of one integration, and you get exactly those. The integration is worked out the same way the logs page does it: from the name of the logger, or else from the file the message came from. Something that is not about an integration, like a library logging on its own, has none.

This action is for administrators only, like the logs page. An error can tell more than everybody in your home needs to read. Your automations can always run it. So can your scripts, unless a user who is not an administrator starts one.

How to use it

  1. Open the automation or script that needs the errors, and select Add action.
  2. Search for errors and warnings, and select System log: List errors and warnings 👻.
  3. To list only some, pick levels under Log level, or type domains under Integration, like hue. Leave both empty for all of them.
  4. Under Response variable, give the list a name, like result. The steps after this one can use it.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant. Run it, and the response shows the errors and warnings.

Missing something here?

An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.