From 126ce10bace535d6633a22e5debc3c0e3773340f Mon Sep 17 00:00:00 2001 From: milanvo Date: Thu, 21 Sep 2017 13:35:42 +0000 Subject: [PATCH] Doc for recorder purge service --- source/_components/recorder.markdown | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/_components/recorder.markdown b/source/_components/recorder.markdown index ddf835cff50..fcfe7314c15 100644 --- a/source/_components/recorder.markdown +++ b/source/_components/recorder.markdown @@ -28,6 +28,7 @@ recorder: Configuration variables: - **purge_days** (*Optional*): Delete events and states older than x days. The purge task runs every 2 days, starting from when Home Assistant is started if you restart your instance more frequently than the purge will never take place. +- **purge_disable_timer** (*Optional*): Disable default purge timer (every 2 days). Default: False. You can then start purge task by [service](#service) call. - **exclude** (*Optional*): Configure which components should be excluded from recordings. - **entities** (*Optional*): The list of entity ids to be excluded from recordings. - **domains** (*Optional*): The list of domains to be excluded from recordings. @@ -85,6 +86,17 @@ recorder: If you only want to hide events from e.g. your history, take a look at the [`history` component](/components/history/). Same goes for logbook. But if you have privacy concerns about certain events or neither want them in history or logbook, you should use the `exclude`/`include` options of the `recorder` component, that they aren't even in your database. That way you can save storage and keep the database small by excluding certain often-logged events (like `sensor.last_boot`). +### {% linkable_title Service `purge` %} + +Call the service `recorder.purge` to start purge task, which deletes events and states older than x days, according to `purge_days` variable setting. + +Automation [action](https://home-assistant.io/getting-started/automation-action/) example: + +```yaml +action: + service: recorder.purge +``` + ## Custom database engines | Database engine | `db_url` |