H.O.O.P. (Hope) - Examples

This topic will be used to share examples for H.O.O.P..

Anyone may and is encouraged to leave messages with examples with H.O.O.P.
Since Trigger Cards device, some double flows in the examples may be reduced to one flow, like Volume based on time (Day/night) - Single flow.

Please leave a link to the flow(s), place a wrap element below it (so you get the flow inline in the message) and write a (short) explanation.

Example link with wrap element:
[Example flow](https://homey.app/nl-nl/flow/Z7rDvx/)
[wrap=iframe id=Z7rDvx][/wrap]

Only post Examples here. For questions and answers, please use the main H.O.O.P. Topic.


Flow Director

Trigger Cards & Action Cards

Flow Variables

Method Group



Example Flow Director - IF THEN

The first examplesshow’s the usefullness of H.O.O.P.
It collects a list of to do, like the vacuum-bin needs to be emptied and the dishwasher is done, and then announces the todo list through Google Service TTS throughout the house.

Before, i had eight flows, now I have one!

Flow to collect and announce a ToDo list for your home

  • This flow collects a list of todo items.
  • First, the flow will only run if the variable IsThuisVandaagAlBegroet (IsHomeAllreadyBeenGreeted) is false.
  • Then it sets the textuale variable teDoenMeldingen (ToDoMessages) to an (almost) empty string (a space).
  • After that it will execute multiple IF statements, and if so, add a a message to the textuale variable TeDoenMeldingen.
  • After the collection of the messages has been done, the messages are played through Google Services TTS and the variable IsThuisVandaagAlBegroet is set to true, preventing the execution again today.
    (The IsThuisVandaagAlBegroet variable is reset every night)

Example Flow Director - If - ElseIf - EndIf

Flow to turn on lights dimmed, full or not at all | Homey

This flow will be activated when there is a motion detected by a sensor and will turn the lights on dimmed, full (90%) or not at all.

  • First the CountDown to turn the light off, is stopped.
  • Then, if the Lumen (lx) of the Sensor is less then 30lx, turn on the lights dimmed at 30%.
  • ElseIf the Lumen (lx) is less then 100lx, turn on the lights at 90%.
  • If the above is not executed, the lights will not be turned on.

Example Flow Variables - Using variables and a custom function

First i created a function called “random” in the App Settings:

Enter the next javascript into the function by clicking edit.

function (arr) {
  return arr[Math.floor(Math.random() * Math.floor(arr.length))];

Then the next flow:

  • First, put a Javascript Array into a Flow Variable type JSON called Kids.
    (Variables are created on the fly, no need to define them in settings, just start the flow to use them)
  • Then set Flow Variable Testname (type String) to: random(Flow Variable - Kids).
    (The returning type needs to be the defined type, in this case a string. JSON accepts any kinds of input)
  • Now you can use the Flow Variable - Testname and send it to your watch, or use it the way you need it.
1 Like

This is one I use to restore my tado heating when the patio door is closed.

Homey has no options to set a dropdown type action card from a variable so H.O.O.P comes to the rescues here.

To set the scene:

  1. I have a flow that is triggered when the patio door opens and that sets a timer.
  2. Next a flow is triggered when the time reaches 0 and that stores the current heating mode tag from the tado lounge thermostat.
  3. I also have a flow that runs when the door is closed and that resets the door open timer, so it doesn’t timeout if it hasn’t already, and then runs the following H.O.O.P flo


Example Flow Director - Volume based on time (Day/night)

Starting Flow | Homey

Method Flow | Homey

This flow will be activated when the Google Service TTS device URL triggers, so when speech is started.

  • If it is daytime, volume will be set to 45%
  • Else, volume will be set to 40%

Example Flow Director - Setting a (BL) variable based on one-flow-logic.

Setting a (BL) variable based on one-flow-logic | Homey

Example Method Group - Announcement (P.A.) Methods

These flows are used in my announcement system, used by many other flows to direct speech-output/announcements throughout the house.
(I might rewrite some flows now that i have the Flow Director cards for IF-THEN-ELSEIF.)

I have all these flows dublicated in sync and async.
The sync methods can be used it you want to do something after annoouncement is done, because the method will wait for the execution to finish and complete with the rest of the flow that executed the method.
I will be sharing the synchronised methods, since asynchronised is just default.

Here is a diagram of the flows.


Send Notification House (message, title) (Await)

Send Notification House (message, title, sendToWatch) (Await)

Send Notification House (message, title, watchMessage, sendToWatch) (Await)

Send Notification TV Bar (message, title) (Await)

Send Notification TV Bar (message, title) - handler (Await)

Send Notification Watch (message, title, watchMessage, sendToWatch) (Await)

Send Notification Watch (message, title, watchMessage) (Await)

Send Notification Watch (message, title) (Await)

And finally a flow that uses the system:

Start test (Await)

Example Using one button for multiple purposes (multiple fired)

This flow can be triggered from a single source (like a button or flow-trigger) but will handle it as if the button can be clicked multiple times.
Because HOOP doesn’t have a debounce-functionality yet, i have created a Countdowntimer called PushButtonPushesResets.
I have also created (in the flow) a number variable called PushButtonPushesCount.
Where ever you see the questionmark, it’s the PushButtonPushesCount variable.

(After you create a flow-variable in flow, they flow needs to be triggered once for the variable to become visible (and to select it)).

Main Method Flow | Homey

  • Conditioncardmode is set to If-Or-Finally
  • First stop the Countdown
  • Then increase the PushButtonPushesCount with one
  • Then comes the IF PushButtonPushesCount equals 1 THEN
    • Then comes the INNER IF Light is Off THen
    • Turn light On
    • Else Turn light Off
    • End If
  • ElseIf PushButtonPushesCount equals 2 THEN dim light to 50%
  • ElseIf PushButtonPushesCount equals 3 THEN dim light to 100%
  • END IF
    And finally, in the 3th And group (watch carefull where you place it!), start the (restart) countdown with an amount of seconds (here 3 is used) which will set PushButtonPushesCount to 0 (zero).

Main Method Flow (reduced flow) | Homey

The INNER IF is replaced with a Toggle Light card.

Countdown stops Flow | Homey

Test trigger Flow | Homey

1 Like

Example Using one button for multiple purposes (waits a second before firing)

Thanks to Arie_J_Godschalk
He created this flow, I used some time to understand and add flowcards :slight_smile:
Therefore you will see flow comments that is not needed
You need to create a counter called "PushButtonPushesDebounce"

1 Push = ON/OFF
2 Push = Dim 50%
3 Push = Dim 100%

1. Hope - (Trigger)

2. Hope (Counter)
Count no. of button pushes “PushButtonPushesCount”
Start counter “PushButtonPushesDebounce” = 1

3. Hope Start (Debouncer)
Counter “PushButtonPushesDebounce” = 0
Start (Debouncer method flow)

4. Hope (Debouncer method)
IF “PushButtonPushesCount” = 1
THEN (turn light ON/OFF)

IF “PushButtonPushesCount” = 2
THEN (Set light 50%)

IF “PushButtonPushesCount” = 3
THEN (Set light 100%)


Nice too see!
You can even easily add dim steps, or other actions with a certain no. of pushes.
I realized f.i. my table lights have 3 favorite dim values: 20%, 50% and 100%
So an extra step is simple to add:
IF “PushButtonPushesCount” = 2
THEN (Set light 20%)

IF “PushButtonPushesCount” = 3
THEN (Set light 50%)

IF “PushButtonPushesCount” = 4
THEN (Set light 100%)

I like it!

I made this 3-step-dim-and-off function earlier on with standard flows, and it took me 7 flows. Yes… seven!

1 Like

Example Volume based on time (Day/night) - one flow

Complete Flow | Homey

This flow will be activated when the Google Service TTS device URL triggers, so when speech is started.

  • If it is daytime, volume will be set to 45%
  • Else, volume will be set to 40%

Example: A 5-function-sequence-click (pulse) button

2 flows needed
– You can add as much steps as you like! (with respect to Homey’s limits)

  • Expected functionality:
    Clicking within x secs follows the sequence;
    Clicking after those x secs, should always turn the light off.
    (So no need for remembering how many clicks are needed here).

  • Sequence:

    • 1st click = dim light to 20%
    • 1st click after x secs = turn light off
    • 2nd click = dim light to 30%
    • 3rd click = dim light to 50%
    • 4rd click = dim light to 100%
    • 5th click = turn light off

You could use H.O.O.P. Flow Variables cards, but I chose to use BetterLogics variables.

  • NumVar used: Eettafel1btnCount

  • Chronograph timer used: Eettafel1btnCountTmr

    • Note, on the BL cards, the zero isn’t shown
  • Flow 1: The sequence function & steps & timer trigger

  • Flow 2: The resetting of the Variable

Have fun. Questions, suggestions, improvements welcome!

1 Like

sadly, it doesn’t make a difference :frowning:

that is what you suggested, so yes and sadly, it doesn’t make a difference

well… it is a hue motion sensor… all of them i have give the same values inside the house. once outside it goed very high.
0 is pitchblack? that is very weird coz even 1 is not needed to have the light on. and yes, i also thought it is strange but i dont know better… :frowning:

but i do can change it to a static value, i can also try that… but… the value was this afternoon about 5 and that is higher then 3 so, it should change it… but it doesn’t.

When a light sensor’s value changes, set a numeric variable with different values, depending on the brightness level



Example Mmultiple triggers in ONE flow

When the Hal Lamp OR Kapstok Lamp is turned on, this flow will be executed.