Run flow only once

Probably answered before, but didn’t find exactly what i was looking for.

" the temperature changed" makes the flowers tun every time the temperature changes. Far enough, but do i make the flow only to run once without disabling the flow?

I think you could use the WHEN function. Eg. Temperature is not 20°C.

If you could explains what you want to achieve, there is someone who could help.

I want thisto only run once when the temperature is over 27. Now i disable it, but then i need another flow to start it again

  1. What is the problem with that?
  2. You can activate the flow with „Activate the flow after x s/min“ within this flow. So you need only 1 flow.
  3. You can use a variable. In my opinion, the best option. But you need also a second flow.

— Temperature changed
— Temperatur is > 27
— The month is between…
— Set variable „Fan“ (or something else) „true“
— Set variable „Fan“ „false“

The have to change the flow „Varmepumpe når ovn brukes“:

— Variable „Fan“ has changed
— Variable „Fan“ is true
— Set the Fan mode „Fan“
— Set the Fan level „5“ after 5 s
— Set the Fan mode „off“

  1. Because i find it unnecessary to have multiple flows just for onw situation and try to avoid it.

  2. Then its based on a timer and not an answer to my question.

  3. Another flow.

Im afraid that it’s not possible to just make a flow run once with the optiona regarding temperature we have

You say only once without specifying when it should reactivate, so if you want EXACTLY what you said you should deactivate the flow and never ever reactivate again. No second flow needed (too bad “delete flow” isn’t available as a card) :wink:

So, assuming you want something useful instead, when should it reactivate? That is what was asked: what do you want to achieve? E.g. if you turn on a light based on the temp: add a “when the light is off” and you’re done.

I’m guessing that without a second flow it will prove really hard. Kind of reminds me like the good old days, when people tried to write entire programs in one single line of Basic. Doable, but not always recommendable.

If you want a oneliner, and do not tell what you want to achieve, I’d suggest looking to HomeyScript. But even then there MUST be a situation, implying a trigger, implying a flow to activate it again.

Two flows is not nessesarily bad, it is most likely the cleanest best performing way to get wat you need in most situations. Other options often imply Homey needs some background work (timers and such), which is less efficient and may obfuscate what is going on if the situation changes inbetween.

1 Like

I want it to reactivate when temp gets under 25.

If there was something like “when temperature passed” then it would not be a problem.

But now its reacting on every change over 27.

No way to fix this without disabling the flow?

Sure there is but u don’t wanna make extra flows so that’s not an option. Ur making it very hard on urself.
@DirkG offered this option alr and u declined it.

1 Like

Its ofcourse upto you to decide… but

Trying to build everything into one flow will make the flow complex, hard to understand and increases the risk of running unintended.

Personally I make a habit of splitting up my flows to keep it simple and efficient.
If you are interested you can read my post “how to structure your flows

But it looks like you proved my point exactly why you need two flows. Somewhere you must have a flow: when temp drops below 25… Reactivate the flow? Or do you want to put the below 25 test in the same flow? That is a contradiction.

And another possible answer is also there already: If you turn the heatpump on when its hot, then put in a rule: when the heatpump is not on. Why would that not work for you?

What you suggest, when it rises above, wont work as wel when the temperature flucuates between 26.9 and 27 all the time.

What you describe is called a Schmitt Trigger. It requires two rules to behave stably.

You could use a boolean from logic to disable it, but that would amount to a surrogate disable. It would behave exactly the same without the visual clues in the flow list. Using a boolean only makes sense if you have clauses besides the boolean, for instance an “or”. Then you’d have a reason to keep the flow active.