Exclude history depricated?

Just discovered this…but I can’t seem to find the new way of doing this. I have a lot of stuff that I don’t want recorded in history (wasting tons of resources) but are used in automations.

2023-06-18 13:16:37.818 WARNING (MainThread) [homeassistant.components.history] The 'exclude' option near /config/configuration.yaml:81 is deprecated, please remove it from your configuration
history:
  exclude:
    domains:
      - automation
    entity_globs:
      - binary_sensor.s31_*_button
      - button.*_ping

You should use recorder excludes for that. History excludes only affected visualization.

Won’t that break logging of the things triggering events?

I don’t ever care about seeing a history of every automation being “on” forever, but I do want the logbook to reflect when they have triggered

Back when they were supported, history excludes only removed entities from the default history view, which used to contain all entities. So they never prevented you system from “wasting tons of resources”.

Actually, this will not add too many records to the database. Only state changes are recorded.
I think excluding automations from recorder would break the logbook, as it queries its data from the recorder database.

Then you are in luck because the history page no longer shows everything by default. You have to select what you are interested in seeing. So excludes are no longer needed.

Won’t it still be filling up the database with the status of all those?

Yes, just as it always did. Excluding an entity from the history page did not exclude it from the recorder database.

And if you want the logbook to display the state changes you must not exclude the entity from the recorder.

There were three excludes you used to be able to make:

Recorder excludes - no state is saved to the database so no history or logbook entries would be displayed.

Logbook excludes - exclude an entity from the logbook display. Did not exclude from the database.

History excludes - exclude an entity from displaying on the “everything displayed” history page. Did not exclude from the database.

Now you only have the first two as the history page does not display everything, only specifically selected entities. So excludes are no longer required for for the history panel.

1 Like

Oh, I thought the logbook and history were separate parts of database storage.

That makes more sense now. Thank you.