-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ruleset doesn't stop on BREAK, if using one-shot detection #7985
Comments
@ascillato Since I'm seeing you have done #4500, do you see what's happening here? |
Ok seems that the solution from here #5897 (comment) doesn't work. |
I've found a workaround:
So the command validating the power is running all the time, which sets a variable Var1, it breaks correctly with BREAK. Rule2 is one-shot, so it detects only changes of Var1 and executes things according to this. It's not the best workaround in my life, but it works 😄 |
Hi, Sorry for the late response. The rule syntax is wrong in your first post: rule1 ON ENERGY#Power>=30 DO Backlog PowerDelta 15 BREAK ON ENERGY#Power>5 DO Backlog PowerDelta 25 ENDON It should be: rule1 ON ENERGY#Power>=30 DO PowerDelta 15 BREAK ON ENERGY#Power>5 DO PowerDelta 25 ENDON |
Hi sorry to come back after a long time, I've a overlooked this response and since my workaround still works it wasn't that important for me ... And my example was oversimplified, it should look more like:
I tried your example out (without Backlog) some time ago, I'm not sure if that worked, though I needed more commands executed once, my workaround is more like:
And as you correctly state the "BREAK ON" doesn't work with Backlog as I expected while writing this issue. Just if someone else has similar expectations and wants a workaround ... |
I don't understand why the problem is closed because I can confirm everything that Cyber1000 has presented here. |
Please, update to latest version and try again your rules. If they don't work as expected, please, open a new issue and share them in order to help you. Thanks. |
2.5 years later...it's still an issue in 13.3.0. |
As long as you understand the flow of events and what one-shot does, using Worst starting point is to try things the way you're used from programming languages. Rules is a rather different thing. |
PROBLEM DESCRIPTION
I've adjusted a solution to my use case from here #5897 (comment)
Following is a simplified repro:
Rule1 ON ENERGY#Power>=30 DO Backlog PowerDelta 15 BREAK ON ENERGY#Power>5 DO Backlog PowerDelta 25 ENDON
I'm testing with a Gosund SP111 and a light bulb at 60W.
I would expect that only the rule with Power>=30 gets executed, but both get executed one after another
I'm using this as a workaround since I get a lot of traffic (my tasmota-device jumps a lot in low power-ranges), I came here from a similar problem here: #7684
Asked on discord but no users with deep knowledge in rules were online.
My log:
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Even chatted there, but found no solution
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:(Please use
weblog 4
for more debug information)TO REPRODUCE
Steps to reproduce the behavior:
Rule1 ON ENERGY#Power>=30 DO Backlog PowerDelta 15 BREAK ON ENERGY#Power>5 DO Backlog PowerDelta 25 ENDON
EXPECTED BEHAVIOUR
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: