# \[APP\]\[Pro\] Better Logic Library - Just some better logic, variable and library management

**URL:** <https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568>\
**Category:** Apps\
**Tags:** app, tools, homey-pro, bll\
**Created:** [December 16, 2018, 10:29pm UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568 "2018-12-16T22:29:57Z")\
**Posts on this page:** 1\
**Showing post:** 471

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [December 3, 2024, 10:35am UTC](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568/471 "2024-12-03T10:35:55Z")

</div>

This should do it:

min(max([calculated\_value],0),1)

> [@Set upper and lower limits for a variable](https://community.homey.app/t/set-upper-and-lower-limits-for-a-variable/119981/2):
>
> This works {{ min(max([value],100),2000) }} So when I replace the example value 15000 with your calculation, it should be like this:

---

_[View the full topic](https://community.homey.app/t/app-pro-better-logic-library-just-some-better-logic-variable-and-library-management/5568)._
