From 258cfd99acb15c5b0a1b65cc5ee6d90e9c00fc6e Mon Sep 17 00:00:00 2001 From: adrian-vlad Date: Wed, 24 Feb 2021 15:34:35 +0200 Subject: [PATCH] Add disable and enable services for recorder (#16366) --- source/_integrations/recorder.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index 370e9ed5b76..00b7d16ef67 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -199,6 +199,8 @@ recorder: - sensor.weather_* ``` +## Services + ### 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. @@ -209,6 +211,14 @@ Note that purging will not immediately decrease disk space usage but it will sig | `keep_days` | yes | The number of history days to keep in recorder database (defaults to the integration `purge_keep_days` configuration) | | `repack` | yes | When using SQLite or PostgreSQL this will rewrite the entire database. When using MySQL or MariaDB it will optimize or recreate the events and states tables. This is a heavy operation that can cause slowdowns and increased disk space usage while it runs. Only supported by SQLite, PostgreSQL, MySQL and MariaDB. | +### Service `disable` + +Call the service `recorder.disable` to stop saving events and states to the database. + +### Service `enable` + +Call the service `recorder.enable` to start again saving events and states to the database. This is the opposite of `recorder.disable`. + ## Custom database engines | Database engine | `db_url` |