This object is in archive! 

If then problem

Kai A shared this question 6 years ago
Need Answer

Hi,

Here is a simplified rule I'm trying to use. Why "himmennin" goes always to 50% value?


For example when I shortly press switch -> after 4 sec the switch status is neutral and ELSE branch should be processed. But why it is always using this True branch and goes to 50%?


I thought it would work like this, but it's not:

1. Switch OFF pressed

2. 4 second wait

3. If switch is still pressed OFF

-> "himmennin" 50%

Else -> "himmennin" 20%

Replies (3)

photo
1

in WHEN use ANY, now the rule start only in OFF state, so it never gets to else part

photo
1

That's what I'm trying to do, rule start only when OFF side of switch is pressed. Then after delay dimming more if OFF side of switch is still pressed.

photo
2

Not sure why, but the general rule is to use an "any" in the when block then have a sub IF to check the state. This seems to clear-up many issues; however, I think you biggest issue is that you need a "REFRESH ALL" before checking the state again. Otherwise, the values within the rule remain static and do not reflect what is happening outside the rule.


/4YjAAAAAElFTkSuQmCC

Leave a Comment
 
Attach a file