[REQUEST] Use more Rule Trigger Comparison Operators for strings (contains and/or starts and ends with) #10208
Replies: 5 comments 5 replies
-
I just created a driver that would benefit from boolean operators like bitwise |
Beta Was this translation helpful? Give feedback.
-
I think it is easy to solve in https://github.com/arendst/Tasmota/blob/development/tasmota/xdrv_10_rules.ino after line 581 code similar to:
And in line 99 & 100:
Also we must to update the wiki docs. I am not an expert in tasmota code, but I think that it will work, and probably not add to much size to binaries as functions starts_with, ends_with, ... are already used in main code. Probably my code will need be updated so it is not case sensitive. But may be Tasmota administrators prefer it "case sensitive". I hope Tasmota will add this feature. Thanks a lot for your work. |
Beta Was this translation helpful? Give feedback.
-
I have tried to create a PR (I am not an expert): ALso, I have updated docs with a PR: tasmota/docs#593 |
Beta Was this translation helpful? Give feedback.
-
Wouldn't a support for regex more generic ? As per regex, |
Beta Was this translation helpful? Give feedback.
-
One thing that is still missing is the comparison if a string is not equal or does not contain something. |
Beta Was this translation helpful? Give feedback.
-
PROBLEM DESCRIPTION
A clear and concise description of what the problem is.
HI, I am making some rules with SerialRecieved/TuyaRecieved/SSerialRecieved. It will be great to use some comparators for "ends with", "starts with" and "contains".
But we need to use, not to have problems in "parseCompareExpression" function, for example these: "$>$< $ |"
(as in HTML tag's for example: < is "start" and > is "end")
I understand that we will have to add more comparators and a few lines of code:
That is because I get sometimes this 55aa0005000501010001010d or this 55aa000200000155aa0005000501010001010d
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
Steps to reproduce the behavior:
It is a request
EXPECTED BEHAVIOUR
A clear and concise description of what you expected to happen.
Get managed to compare strings: ends with, starts with and contains.
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
It is a request
ADDITIONAL CONTEXT
Add any other context about the problem here.
Thanks a lot for your effort
(Please, remember to close the issue when the problem has been addressed)
Beta Was this translation helpful? Give feedback.
All reactions