# Ui-level node without min/max values?

**URL:** <https://discourse.nodered.org/t/ui-level-node-without-min-max-values/63510>\
**Category:** General\
**Tags:** node-red-dashboard, ui-widgets\
**Created:** [6 June 2022 09:16 UTC](https://discourse.nodered.org/t/ui-level-node-without-min-max-values/63510 "2022-06-06T09:16:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [6 June 2022 09:16 UTC](https://discourse.nodered.org/t/ui-level-node-without-min-max-values/63510/1 "2022-06-06T09:16:53Z")

</div>

![grafik](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/a/3a7ab125c93422b5f6ff0d389a1bba2535b786ea.png)

@hotNipi, (how) can I disable the min and max values?  
I want to use ui\_level for the current position of my roller shutter and do not need these values.

---

<div class="post-metadata">

**Author:** ![hotNipi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hotnipi/32/383_2.png) [@hotNipi](https://discourse.nodered.org/u/hotNipi)\
**Post date:** [6 June 2022 11:29 UTC](https://discourse.nodered.org/t/ui-level-node-without-min-max-values/63510/2 "2022-06-06T11:29:36Z")

</div>

You cant.  
But as it is not too complicated thing to do from scratch, maybe you'll get much more flexibility that way.

```auto
[{"id":"cadf9b85060d9334","type":"ui_button","z":"9141c3fbcc7d9e2b","name":"","group":"f6124e036e2d2ffb","order":2,"width":1,"height":1,"passthru":false,"label":"▲","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"-5","payloadType":"num","topic":"topic","topicType":"msg","x":350,"y":1060,"wires":[["a462cbe137de5aef"]]},{"id":"dca7c216a33cc29f","type":"ui_button","z":"9141c3fbcc7d9e2b","name":"","group":"f6124e036e2d2ffb","order":4,"width":1,"height":1,"passthru":false,"label":"▼","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"5","payloadType":"num","topic":"topic","topicType":"msg","x":350,"y":1120,"wires":[["a462cbe137de5aef"]]},{"id":"f42d9612c0296acf","type":"ui_template","z":"9141c3fbcc7d9e2b","group":"f6124e036e2d2ffb","name":"DIY level","order":3,"width":1,"height":1,"format":"<style>\n.level-vert{\n position:absolute;\n inset:0; \n bottom:0;\n width:100%; \n background:repeating-linear-gradient( 0deg, green, green 2px, transparent 2px, transparent 4px);\n height:calc(1% * var(--size));\n transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n</style>\n<div id=\"{{'level_'+$id}}\" class=\"level-vert\"></div>\n\n\n<script>\n (function(scope) {\n const min = 0\n const max = 100\n scope.$watch('msg', function(msg) {\n if (msg) {\n console.log(msg)\n // Do something when msg arrives\n const v = Math.floor(((msg.payload - min) / (max - min)) * 100);\n const t = Math.floor(((msg.top - min) / (max - min)) * 100);\n document.getElementById('level_'+scope.$id).style.setProperty('--size', v);\n }\n });\n})(scope);\n</script>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":640,"y":1080,"wires":[[]]},{"id":"a462cbe137de5aef","type":"function","z":"9141c3fbcc7d9e2b","name":"","func":"let p = context.get(\"p\") || 100;\np = parseInt(msg.payload + p);\nif(p > 100){\n p = 100\n}\nif (p < 0){\n p = 0\n}\ncontext.set(\"p\",p);\nmsg.payload = p\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":1080,"wires":[["f42d9612c0296acf"]]},{"id":"f6124e036e2d2ffb","type":"ui_group","name":"Default","tab":"34ab7d39f3e308fc","order":1,"disp":true,"width":"5","collapse":false,"className":""},{"id":"34ab7d39f3e308fc","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![stefan24](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stefan24/32/23075_2.png) [@stefan24](https://discourse.nodered.org/u/stefan24)\
**Post date:** [6 June 2022 21:42 UTC](https://discourse.nodered.org/t/ui-level-node-without-min-max-values/63510/3 "2022-06-06T21:42:31Z")

</div>

> [@hotNipi](#):
>
> not too complicated thing

OMG! Thank you! I just had to exchange min and max and it worked!!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [20 June 2022 21:42 UTC](https://discourse.nodered.org/t/ui-level-node-without-min-max-values/63510/4 "2022-06-20T21:42:34Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
