Is simple IF logic possible?

Hello,
very new Homey user here. I have a simple problem here that I am struggling with.
I made a flow with a virtual button that turns a light on or off.
Now a part of this flow is to send a notification to my phone and have Homey say what was done: “Office light turned on/off” depending on what was done.
I just cannot figure out how to make it say ON or OFF depending on that action… I can use the tag/variable called “Turned on” but that just gives me a true or false.
So the sentence would be “Office light turned true” if the light was turned on.

I made a flow that activates when the light turns on and sets a string variable to “ON” and made another flow for “OFF”… this sort of works but only fires after the action has been taken and it will instead give me the string before it updates.

My question is this: Is there some way to do simple IF logic in the flow itself and make sure it is done before the speech/notification? (IF “Turned on” = true THEN “LightStatus” == “On”).

Mind you this is a very simple example but it would certainly be helpful later on as well in more complicated flows.
Edit: added Screenshots
Screenshot 1 (the main flow that uses the OfficeLight variable):

And it’s not just an option to add the notification part in the 2 flows?
Maybe post a screenie of ur flows?

As a new user I can only post 1 picture in the main post, so the second one is here:

Screenshot 2 (OfficeLight variable is set to either On or Off based on the status of the light. There are 2 flows for this… this is the Off flow, but the On flow is the same):

So u can add the speech part in that 2 flows?
WHEN turned on THEN say Light is on!

While it is certainly a possibility, there are a couple of things with this option:

  1. It would (in this case) mean that I would get a notification if I turned off the light by other means than the virtual button.
  2. I am mostly interested in this particular path for future, more advanced, flows.

If it is possible to do this in a single flow somehow, that would be best… if it isn’t possible there is probably a longer path to doing it and other actions in the future. It just seems like it should be there somehow.

WHEN button is pressed AND lamp is off THEN turn light on AND yell the lights are on ELSE turn the light off AND yell the lights are goin off?

I had not noticed the ELSE (It is so tiny) :smile:
It works like a charm. Thank you for your help Rocodamelshe.

1 Like

Anytime, that’s why we are here!

1 Like