Rule for control a simple water leak sensor (two cables) #24176
ortegafernando
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
|
As a starting point, dont break the syntax for rules. Instead of the broken Use () around logical expressions, and don't combine The many arcane syntax details to even make rules work is just one of the reasons why I recommend using Berry instead of "surprises" with rules just not working, and not giving you any error messages why. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I have done a simple water leak sensor with two cables (one to A0, and the other one to GND) with a 1 mega resistor external pull up.
What do you think about this rule? do you think it has more improvement?
Explanation:
As you can see, I have added a double histeresys:
I have to repeat this for 4 analog inputs.
What do you think?
NOTE: I am using ESP32, I have never started with berry. I usually try first this problems in rules before start to program berry. If I find a solution with rules..... may be this is the reason why I have never started with berry 😂. Probably there is a cleaner way, but rules are simple and, please, tell me about this rule. Only speak me about berry if there is a very important improvement, thanks
Thanks
Beta Was this translation helpful? Give feedback.
All reactions