mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-22 08:46:51 +00:00
Add counter.set_value service (#27345)
Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
aac977cb5f
commit
089f3c794e
@ -12,7 +12,7 @@ ha_domain: counter
|
|||||||
ha_integration_type: helper
|
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
|
## Configuration
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ If `restore` is set to `true`, the `initial` value will only be used when no pre
|
|||||||
|
|
||||||
## Services
|
## Services
|
||||||
|
|
||||||
Available services: `increment`, `decrement`, `reset` and `configure`.
|
Available services: `increment`, `decrement`, `reset`, `set_value` and `configure`.
|
||||||
|
|
||||||
### Service `counter.increment`
|
### 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`. |
|
| `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`
|
### Service `counter.configure`
|
||||||
|
|
||||||
With this service the properties of the counter can be changed while running.
|
With this service the properties of the counter can be changed while running.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user