Why am I struggling with this simple rule #23325
Replies: 2 comments 5 replies
-
Because you seem to assume that trigger expressions with What you do have is https://tasmota.github.io/docs/Rules/#rule-variables including some features like power channels (but not events). |
Beta Was this translation helpful? Give feedback.
-
Ok so I've now added variables and this seems to work. Var2 stores the value of power2, var3 for Power3. I couldn't get the if statements working with power2 etc. Rule1 ON Power2#state==1 DO backlog var2=1 ; if (var3==1) Dimmer 70 endif ENDON ON Power3#state==1 DO backlog var3=1; if (var2==1) Dimmer 70 endif ENDON I have another rule that when the power states change to 0, then set the corresponding variable to 0. I'm sure this is the long way around. However it works now. |
Beta Was this translation helpful? Give feedback.
-
Help needed..
I have tried many times. Multiple ways.. read a reasonable amount.. so this post doesn't come without trying. It's still early days for rules in tasmota for me, but I have spent considerable time already on this.
I am trying to send a servo motor (dimmer) to a certain value if BOTH two switches (power2 and power3) are closed.
This is what I thought would work..
Rule1 ON Power2#state==1 DO if (Power3#state ==1) Dimmer 70 endif ENDON ON Power3#state==1 DO if (Power2#state ==1) Dimmer 70 endif ENDON
I have tried assigning variables and using maths to do this... I just couldn't quite get that to work... Partially yes.
I originally tried an AND statement in the trigger, but then read that conditional statements can't be used for triggers
Beta Was this translation helpful? Give feedback.
All reactions