Rule not working >> Variable ignored?

HeroS - www.domotica-blog.nl shared this question 10 years ago
Answered

Hi Zipato,


I got this rule:

hmGvDRXaT29u0i3cyIm5

I want to todo the following:


IF

PC = on or PC power > 100

Then Speaker ON


IF PC = Off or Pc power < 25

Then Speaker off


When the pc and speakers are off i don't want it to keep turning the speakers off. So i set a variable at the end.


But it keeps turning the speaker off. I have done some testing (E-mails are coming in) ...i think it ignores the variable pc speakers.


Log:

KeufNhsK7mk4E7eYmH6H


LXu4033xxyeS9rMo1ucz


pLANI4OY7olPI5EMkrRt


Can u please help with this rule.

Replies (4)

photo
1

Your IF condition with speaker variable is wrong.

Remove everything and leave just 'speaker = 1'

photo
1

Also note that all of your IF conditions will be executed when you turn PC on and your PC current consumption is lower than 25 (didn't get a chance to update).

Maybe it would be better to use operator AND in first and second IF condition.

photo
1

Hi Nenad,


Thanks! I got it working but had to make 2 rules.

vEFekmMMHstpmc0MxJnT

photo
1

I'm glad you get it to work.

Sometimes it's better to keep it simple and split complex rules :)

Leave a Comment
 
Attach a file