Advanced Flow Working in Test State But Failing Once Saved

Very strange behavior. I setup a very simple flow. I am using a ZooZ dimmer switch in this scenario.

When I test it before saving by pressing the blue start on the first card, it works flawlessly. I monitor it on my phone to see it happening in real time and also confirm within the web app.

However, when I save the flow is when it gets strange and stops working. There is also no other flows with this switch so nothing would be affecting it.

The flow shows it completed successfully, but the switch is hung at 1%.

I don’t know where to begin to troubleshoot this and hopeful someone can lend a helping hand.

So: when turned off → dim to 1% (but it is off?) → turn it off (but it was already off)?

I must be missing some logic???

This is what was suggested by multiple people to achieve a turn on without going straight to 100% and then to the desired dim %.

So when turned off → dim to % → then turn off

Turned off does not “turn it off”, it’s the action of being turned off that is evoking something.

Since the dimmer switch defaults to it’s last dim % when flipped on again it would default to 1% and then ramp up to the desired dim % within another flow.

I do not know the device but it sounds not logical. The end starts it again (because then you turn it off).

Hmmm that’s a good point. I’m now questioning why so many people suggested this as a solution…

But why would it then work in the test state and not in the actual saved flow?

Your flow is only working with off

Test-state does not test the status to trigger it. It presumes it is true and I also do not know if it will start itself again in such a case. That you can test by adding as second step to post info in your timeline.

So maybe you can help me.

I am trying to achieve the below.

When I turn on a dimmer switch on manually from the wall, turn on to 25% during the time of 9pm and 6am. All other times, turn on to 100%.

Every suggestion was to do the following as to not have the dimmer ramp up to 100% and then go to the desired 25%.

When turned off → dim to 1% → then turn off

Hence my supreme confusion right now.

Change to: When turned off AND dim is not 1% → dim to 1% → then turn off

Assuming that you can set dim to 1% when it is turned off.

That’s not what I meant, and it causes a loop
When turned off → dim to % (this causes most lights to turn on with dimlevel %) → Then turn off
Now the flow starts again immediately, because:
When turned off → dim to % (this causes most lights to turn on with dimlevel %) → Then turn off
Now the flow starts again immediately, because:
When turned off → dim to % (this causes most lights to turn on with dimlevel %) → Then turn off
Now the flow starts again immediately, because …

And so on and on.

I even showed it in the other topic, you added the trigger somehow :man_shrugging::wink:

I did not say to trigger the flow with ‘When light X is turned off’

I meant, or tried to explain, in all the flows where you use the action card “Then turn light X off” you should use
Then…
-dim light X to 1%
-turn light X off after 1s
instead.

Now the light should have dimlevel 1% when you turn it on from anywhere.

I hope it’s a bit clearer now

Normally the flow should be something like this:
WHEN:the ZooZ dimmer switch is flipped
AND: the master closet is turned on
True THEN: dim master closet to 25% and turn off master closet
False THEN if time between 21:00 and 6:00
True THEN dim master closet to 25%
False THEN dim master closet to 100%

Yes I did not understand and I honestly still don’t quite wrap my head around all this. However, I think I may have confused everyone thinking that I have both a smart switch and smart bulbs. The switch is the only thing that is smart. So, the switch is the only thing that controls the lights so I can’t specify “When light x is turned off”. Which is why my only option was to construct the flow the way I did based on your feedback. I truly appreciate everyone’s help and patience with me.

I unfortunately don’t have a WHEN for Zooz that is toggle of/on but just a Turned On, Turned Off, or Dim Level Changed. So the only way for me to copy your flow is to do the following. However, I am not sure this won’t cause the same loop I was dealing with before.

These are my construct options for the switch for WHEN

These are my construct options for the switch for AND

These are my construct options for the switch for THEN

I think there is a language problem: “Turned off” can mean “When the switch is toggled to off” or it can mean “when the light is switched off”.
I thought it means “when the switch is toggled to off”.

By the way: if no flows are defined in Homey, nothing should happen when you toggle the switch. If the light goes on or off, the switch controls the lamp directly and that connection shall be destroyed…

The lights turn on and off, or dim normally if no flows are defined in Homey as the switch controls the ceiling lights regardless of a hub (Homey) or not. The switch is wired directly to the lights.

I could just not be asking the right question and confusing everyone, which if the case I apologize.

To clarify:
The switch is wired directly to the lights. And the lights are not smart, just the switch is.

Would it be possible to use the zwave flow to send a raw command directly to the switch to set a custom dim %? This way the switch could already have the desired dim % before turning on?

The Node ID is 14
image

And the parameter that stores the custom percentage is 18

That clarifies your problem. There must also be a setting to disconnect the input (your toggle switch) from the output (the connected lamp). So the lamp is controlled only by flows.

Or use the Z-wave raw command in Homey Developer Tools.

See parameter 15 to disconnect the input from the output.

Based on this what is possible is to use a variable to store the dim-level.

One small flow needed: If Dim changed → set variable to … Then possible to use the AND with a logical-card.

I didn’t realize that.

With the WHEN-Card ‘mastercloset-master bedroom is turned off’
combined with the THEN-Card ‘Turn off master closet-master bedroom’ you create an infinite loop. Homey will not allow that. You need another trigger-card.


Can you do this test:
I am pretty sure that this flow will work as wanted if you replace WHEN-Card ‘master-closet-masterbedroom is turned off’ with the WHEN-Card ‘Brycen’s Cave is turned off’.