I’m working to create logicblocks that trigger if a numeric variable is within a certain range. Currently, numeric conditions only support <, >, <=, >= and ==. It would be great if Apilo could check within a range. Thanks!
Hi @warzy! Welcome to the Community
Could you give us a little bit more detail regarding what you are automating? How/why are you checking that a number is within a range? What logic is it driving? Maybe we can come up with a nice solution together.
We have this example from another member of the community, who wanted to turn on a light when the UV index was within a range, it might give you some ideas :
Hi Anna! Thanks I figured out a solution.
My automation was to trigger two lights in my home to change colors depending on two conditions: 1) Weather Condition (clear, cloudy, raining, snowing, etc) and 2) Temperature Range (“Cold” (0 - 50 degrees F) “Comfortable” (50-80) or “Hot” (80+).)
For example, if it is Rainy and Hot outside, light one turns blue, and light two turns red. This is triggered by weather underground and Ifttt with help from Apilio.
My challenge was around using Apilio to define the conditions of “Cold”, “Comfortable” and “Hot”. I ended up using IFTTT’s filter feature to simplify this by defining those ranges with some javascript, and instead of updating the exact temperature numerical variable in Apilio, just returning the condition.
It would be easy to define cold (<30) and hot (>80) conditions in Apilio, but defining comfortable would be more complex in Apilio since it is a range, and apilio can only check if it is greater than or less than a single value. Adding a range feature would just simply some condition checks. Hopefully this makes sense
Great! - thanks for your example and feedback
Hi @warzy ! We’ve just released this feature if you’d like to give it a go?
Thanks!
Another PFA piece of functionality from the s! thank you!