From b0a096bd4c1a4ae5c1f31c6d4db805f1aaf93588 Mon Sep 17 00:00:00 2001 From: PeteBa Date: Mon, 17 Jan 2022 20:03:36 +0000 Subject: [PATCH] Clarify optional parameters for purge_entities service call (#20341) --- source/_integrations/recorder.markdown | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/_integrations/recorder.markdown b/source/_integrations/recorder.markdown index a14c71b2423..9b61f82533b 100644 --- a/source/_integrations/recorder.markdown +++ b/source/_integrations/recorder.markdown @@ -219,14 +219,16 @@ Note that purging will not immediately decrease disk space usage but it will sig ### Service `purge_entities` -Call the service `recorder.purge_entities` to start a task that purges events and states from the recorder database that match any of the specified `entity_id`, `domains` and `entity_globs` fields. Note: leaving all three parameters empty will result in all entities being selected for purging. +Call the service `recorder.purge_entities` to start a task that purges events and states from the recorder database that match any of the specified `entity_id`, `domains` and `entity_globs` fields. Leaving all three parameters empty will result in all entities being selected for purging. | Service data attribute | Optional | Description | | ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `entity_id` | yes | A list of entity_ids that should be purged from the recorder database. | +| `entity_id` | yes* | A list of entity_ids that should be purged from the recorder database. | | `domains` | yes | A list of domains that should be purged from the recorder database. | | `entity_globs` | yes | A list of regular expressions that identify entities to purge from the recorder database. | +Note: The `entity_id` is only optional when used in `automations.yaml` or `scripts.yaml`. When using the UI to call this service then it is mandatory to specify at least one `entity_id` using the Target Picker or via YAML mode. + ### Service `disable` Call the service `recorder.disable` to stop saving events and states to the database.