I’m currently working on a new Homey app called Flow Gadgets .
The app provides useful helper cards for Flows and Advanced Flows. Some of these cards already exist in my app Widget Forge , but many cards are brand new. The cards that are not widget-specific will eventually be marked as deprecated in Widget Forge, because they fit much better into this new, more generic helper app.
From now on, all future generic helper cards will be added to Flow Gadgets instead of Widget Forge.
Then cards currently included:
Calculate formula
Invert number
Generate random integer
Round number
Absolute number
Absolute difference
Apply deadband
Clamp number
Average number from list
Median number from list
Min / Max number
Min / Max number from list
Percentage of
Percentage change
Map number to range
Invert boolean
Boolean to text
Map tag text
And cards currently included:
Evaluate formula
Is number between / not between
Is number positive / not positive
Temporary values / variables:
Flow Gadgets also includes advanced cards to create, read, and read-and-release temporary number, text, and boolean values.
These temporary values are stored in memory for a limited time and can be useful when values need to be shared between Flows without creating global Homey variables.
More cards will follow depending on user requests and my own needs.
Thank you for your reply. The deadband is explained in detail in the doc. Let me try to explain it here. Let’s say you have a sensor that goes from -1000 to + 1000. Around 0 it changes often fast in small steps like 4,-3,7,-10,15,-12 and so on. If you use this value it triggers a flow very often or makes a display in a widget change colors often in fast intervals. When you define a deadband from -20 to +20 the card will return 0 for the previous values. Only when the sensors value is over 20 it will return the true positive value of the sensor and only when the value is below -20 it will show the true negative value of the sensor. The deadband is the zone around zero that is simply replaced by zero. -1000…| -20 0 +20 | …+1000.
Clamp is quite the oposite of a deadband. Let’s suppose you have a sensor that outputs standard values from 0 to 100, but can output pikes up to 130. When you define a clamp from 0 to 100, and value between 0 and 100 is returned by the card but when a value is 130 then 100 will be returned. It is a kind of normalisation. All values below the clamp are returned with the lowest clamp value and all values above the clamp are returned as the highest clamp value.
Example: clamp -50 to +150
-40 returns -40
-60 returns -50
130 returns 130
180 returns 150
The # Result is the tag returned by the Calculate card.
I’m sorry, but I’m not sure to understand your request. Can you please explain more in detail what “duration of flow run” should be and what it should do.
The card is flexible but I think most of us will use it around zero. I use it for example for my PV dashboard as in many situations the grid is used to balance the system to preserve battery life. My System often shows fast changing grid values from -100W to +100W even when there is enough solar energy. So I use a deadband from -100 to +100 before sending data to Widget Forge (my other app) so that my grid simply shows a stable zero. But it is possible to define a deadband from +200 to +300 for example, even that I do not see a real life usecase in my smarthome. I simply think the card should offer this fexibility.
At my knowledge, there is no way to get the “flow ends” information from Homey. You can do it with a workaround. If different branches run at the same time, use different temporary values. If you need one consolidated value at the end, read and release every temporary value and store the value in another temporary value. While I see in theory what you mean, I don’t see the practical usecase. If you have a concrete case, please share it with me.
As you say these are technical terms that many lambda users do not know. That’s why I decided to call it “Always round down” and “Always round up” but that are exactly these functions.
Just for your info: The deadband can also be used in the Calculate card with the syntax { value ; lower deadband limit ; upper deadband }, and even in a nested form. That can also be found in the doc
The 3 min is just a fallback. You should always use the “Get and release” at the end to release the temporary value (delete from memory). But as flows become more complex chances are great that this card is omitted. Then the release will be done automatically after the 3 min to avoid memory overflooding.