|
144 | 144 | <ServiceCallConfiguration v-model="serviceRotation"
|
145 | 145 | :available-entities="availableEntities"
|
146 | 146 | :available-services="availableServices"></ServiceCallConfiguration>
|
| 147 | + |
147 | 148 | <details class="mb-2">
|
148 | 149 | <summary>Available variables</summary>
|
149 | 150 | <div class="form-text">
|
|
159 | 160 | that represents the absolute rotation value of the dial.
|
160 | 161 | </div>
|
161 | 162 | </details>
|
| 163 | + |
| 164 | + <label class="form-label" for="rotationTickMultiplier">Dial rotation tick multiplier |
| 165 | + (x{{ rotationTickMultiplier }})</label> |
| 166 | + <input id="rotationTickMultiplier" v-model="rotationTickMultiplier" class="form-range" max="10" |
| 167 | + min="0.1" step="0.1" type="range"> |
| 168 | + <div class="form-text mb-2"> |
| 169 | + Each tick of the dial will be multiplied with this value. This results in faster or slower value changes. |
| 170 | + </div> |
| 171 | + |
| 172 | + <label class="form-label" for="rotationTickBucketSizeMs">Dial rotation tick bucket size |
| 173 | + ({{ rotationTickBucketSizeMs }} ms)</label> |
| 174 | + <input id="rotationTickBucketSizeMs" v-model="rotationTickBucketSizeMs" class="form-range" max="1000" |
| 175 | + min="0" step="50" type="range"> |
| 176 | + <div class="form-text mb-2"> |
| 177 | + If greater than zero, ticks are aggregated for the given amount of milliseconds and then passed to your |
| 178 | + service call. This results in less service calls. A value of zero will result in a service call for each |
| 179 | + tick, which may cause trouble with home assistant. |
| 180 | + </div> |
| 181 | + |
162 | 182 | </AccordeonItem>
|
163 | 183 | </template>
|
164 | 184 |
|
@@ -199,6 +219,9 @@ const serviceLongPress = ref({})
|
199 | 219 | const serviceTap = ref({})
|
200 | 220 | const serviceRotation = ref({})
|
201 | 221 |
|
| 222 | +const rotationTickMultiplier = ref(1) |
| 223 | +const rotationTickBucketSizeMs = ref(300) |
| 224 | +
|
202 | 225 | const useCustomTitle = ref(false)
|
203 | 226 | const buttonTitle = ref("{{friendly_name}}")
|
204 | 227 | const useStateImagesForOnOffStates = ref(false) // determined by action ID (manifest)
|
@@ -255,6 +278,8 @@ onMounted(() => {
|
255 | 278 | serviceLongPress.value = settings["button"]["serviceLongPress"]
|
256 | 279 | serviceTap.value = settings["button"]["serviceTap"]
|
257 | 280 | serviceRotation.value = settings["button"]["serviceRotation"]
|
| 281 | + rotationTickMultiplier.value = settings["rotationTickMultiplier"] || 1 |
| 282 | + rotationTickBucketSizeMs.value = settings["rotationTickBucketSizeMs"] || 300 |
258 | 283 | })
|
259 | 284 | }
|
260 | 285 | })
|
@@ -367,7 +392,10 @@ function saveSettings() {
|
367 | 392 | serviceLongPress: serviceLongPress.value,
|
368 | 393 | serviceTap: serviceTap.value,
|
369 | 394 | serviceRotation: serviceRotation.value
|
370 |
| - } |
| 395 | + }, |
| 396 | +
|
| 397 | + rotationTickMultiplier: rotationTickMultiplier.value, |
| 398 | + rotationTickBucketSizeMs: rotationTickBucketSizeMs.value |
371 | 399 |
|
372 | 400 | }
|
373 | 401 |
|
|
0 commit comments