From 089f3c794ea43fd04b98767c6424ba1c5064b606 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 10 May 2023 18:52:20 +0200 Subject: [PATCH] Add counter.set_value service (#27345) Co-authored-by: Franck Nijhof Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/counter.markdown | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/source/_integrations/counter.markdown b/source/_integrations/counter.markdown index 76921188162..f652d28bd48 100644 --- a/source/_integrations/counter.markdown +++ b/source/_integrations/counter.markdown @@ -12,7 +12,7 @@ ha_domain: counter ha_integration_type: helper --- -The `counter` integration allows one to count occurrences fired by automations. +The Counter integration allows one to count occurrences fired by automations. ## Configuration @@ -85,7 +85,7 @@ If `restore` is set to `true`, the `initial` value will only be used when no pre ## Services -Available services: `increment`, `decrement`, `reset` and `configure`. +Available services: `increment`, `decrement`, `reset`, `set_value` and `configure`. ### Service `counter.increment` @@ -111,6 +111,15 @@ With this service the counter is reset to its initial value. | ---------------------- | -------- | ----------- | | `entity_id` | no | Name of the entity to take action, e.g., `counter.my_custom_counter`. | +### Service `counter.set_value` + +This service allows setting the counter to a specific value. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | ----------- | +| `entity_id` | no | Name of the entity to take action, e.g., `counter.my_custom_counter`. | +| `value` | yes | Set the counter to the given value. | + ### Service `counter.configure` With this service the properties of the counter can be changed while running.