I have the following flow in my kitchen. As Homey doesn’t support my Ikea dimmer I wanted to make something that would do the job for a while. Everything seems to work fine (I use the notification to check the variable), but the Ikea lights don’t dim to the set value. Any ideas on what to do? It seems they just turn on, but don’t dim to the set value. They don’t even dim to the previous value (which would indicate some sort of delay somewhere), but always to the last used value.
I’ve also tried setting the device dim level directly, but with the same [lack of] result.
Thanks, that was it. HOWEVER, now there’s another problem.
I’ve tried “less than 1” (stopped one short), “less than 1.01” (went to 100%) and “not larger than 1” etc. Except for the first, this is what happens when I increment by 0.2.
20%, output “Led set to 0.2”
40%, output “Led set to 0.4”
60%, output “Led set to 0.6”
80%, output “Led set to 0.8”
100%, output “Led set to 1”
Turned off, output “Led turned off (1.2)”
Still turned off, output “Led set to 0”
20% etc etc
The first statement in the “else” clause is to set the variable to 0.
This is indeed strange. Could you attach exact flow which produced this output? I suppose the screenshot in the original post is outdated, and I’m pretty sure there are some cards which were not visible during taking a screenshot (maybe https://flow.homey.app/ would be easier to screenshot)
When you Set Dim to, you don’t have to Turn ON, this are two commands for ON at the same time, this could influence each other. Same for OFF, better remove:
Ok, so I’m checking my variable to see if it’s 1 or higher (which should trigger the ‘turn off’ clause). While it’s from 0.0 to 0.8, this should be true.
The expected result would be, if true the variable is incremented to 0.2-1.0, dimming is done and the variable is output. If false (the variable is already 1), the variable should be set to 0 and the lights turned off. The notification should then tell me that the variable is reset. Next click should be 0, in which the true clause is met again.
This is the output. Note that it’s turning off while the variable is 1, then the true clause is met but the variable doesn’t increment before the next round. It’s almost as if the increment is delayed somehow.
Multiple action cards in a flow are executed in parallel (all at the same time), while you’re assuming that they are executed sequentially (one after the other).
So while the action to increment the variable is started, the action to log the value of the variable is also started. And because the variable hasn’t been incremented yet, it will log the “previous” value.