diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index 11e39f16ada..740a56ea120 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -47,16 +47,16 @@ recorder: required: false default: 3 type: integer + auto_purge: + description: Automatically purge the database every night at 04:12 local time. Purging keeps the database from growing indefinitely, which takes up disk space and can make Home Assistant slow. If you disable `auto_purge` it is recommended that you create an automation to call the [`recorder.purge`](#service-purge) periodically. + required: false + default: true + type: boolean purge_keep_days: description: Specify the number of history days to keep in recorder database after a purge. required: false default: 10 type: integer - purge_interval: - description: How often (in days) the purge task runs. If a scheduled purge is missed (e.g., if Home Assistant was not running), the schedule will resume soon after Home Assistant restarts. You can use the [service](#service-purge) call `purge` when required without impacting the purge schedule. If this is set to `0` (zero), automatic purging is disabled. - required: false - default: 1 - type: integer commit_interval: description: How often (in seconds) the events and state changes are committed to the database. The default of `1` allows events to be committed almost right away without trashing the disk when an event storm happens. Increasing this will reduce disk I/O and may prolong disk (SD card) lifetime with the trade-off being that the logbook and history will lag. If this is set to `0` (zero), commit are made as soon as possible after an event is processed. required: false @@ -94,7 +94,7 @@ recorder: type: list {% endconfiguration %} -Defining domains and entities to `exclude` (aka. blacklist) is convenient when you are basically happy with the information recorded, but just want to remove some entities or domains. Usually, these are entities/domains that do not change or rarely change (like `updater` or `automation`). +Defining domains and entities to `exclude` (i.e. blacklist) is convenient when you are basically happy with the information recorded, but just want to remove some entities or domains. ```yaml # Example configuration.yaml entry with exclude @@ -113,7 +113,7 @@ recorder: - call_service # Don't record service calls ``` -define domains and entities to record by using the `include` configuration (aka. whitelist) is convenient if you have a lot of entities in your system and your `exclude` lists possibly get very large, so it might be better just to define the entities or domains to record. +Defining domains and entities to record by using the `include` configuration (i.e. whitelist) is convenient if you have a lot of entities in your system and your `exclude` lists possibly get very large, so it might be better just to define the entities or domains to record. ```yaml # Example configuration.yaml entry with include @@ -146,11 +146,12 @@ If you only want to hide events from your history, take a look at the [`history` ### Service `purge` Call the service `recorder.purge` to start a purge task which deletes events and states older than x days, according to `keep_days` service data. +Note that purging will not immediately decrease disk space usage but it will significantly slow down further growth. -| Service data attribute | Optional | Description | -| ---------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `keep_days` | yes | The number of history days to keep in recorder database (defaults to the integration `purge_keep_days` configuration) | -| `repack` | yes | Rewrite the entire database, possibly saving some disk space. Only supported for SQLite and requires at least as much disk space free as the database currently uses. | +| Service data attribute | Optional | Description | +| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `keep_days` | yes | The number of history days to keep in recorder database (defaults to the integration `purge_keep_days` configuration) | +| `repack` | yes | Rewrite the entire database, possibly saving some disk space. This is a heavy operation that can cause slowdowns and increased disk space usage while it runs. Only supported for SQLite and PostgreSQL. | ## Custom database engines