From ccfbdbd1151aed219ff0c6c97fee965bf3fbb1ef Mon Sep 17 00:00:00 2001 From: Rohan Kapoor Date: Sun, 31 Mar 2019 20:59:11 -0700 Subject: [PATCH 1/2] Add minimum/maximum to counter --- source/_components/counter.markdown | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/source/_components/counter.markdown b/source/_components/counter.markdown index dd0c1a7c24f2..18795fd288c6 100644 --- a/source/_components/counter.markdown +++ b/source/_components/counter.markdown @@ -51,6 +51,14 @@ counter: required: false type: integer default: 1 + minimum: + description: Minimum value the counter will have + required: false + type: integer + maximum: + description: Maximum value the counter will have + required: false + type: integer icon: description: Icon to display for the counter. required: false @@ -93,6 +101,18 @@ 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`. | +#### {% linkable_title Service `counter.setup` %} + +With this service the properties of the counter can be changed while running. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | ----------- | +| `entity_id` | no | Name of the entity to take action, e.g., `counter.my_custom_counter`. | +| `minimum` | yes | Set new value for minimum. None disables minimum. | +| `maximum` | yes | Set new value for maximum. None disables maximum. | +| `step` | yes | Set new value for step | + + ### {% linkable_title Use the service %} @@ -103,4 +123,3 @@ Select