@giovanni wrote:
Hi all,
I have a smart switch (with power metering) that turns on the irrigation pump on my balcony.
I set-up a nice scheduler on ha to water my plants regularly, but as of now I have no way of knowing if the tank is empty with the risk of not only having my plants dry, but also damaging the pump (it is not supposed to run dry). To prevent this risk, I normally check the power consumption of the pump to understand whether the tank is full or empty (if the tank is empty, the pump consumes way less, obviously, as it does less work).
I would like to have a “fake” sensor tell me if the power consumption of the pump was above or below a certain threshold (20 watts) the last time it ran. I was thinking to do this by setting-up an automation that would activate when the pump is running (first condition) and would set the state of a boolean sensor to “empty” in case the power consumption is below the threshold (second condition).
Can someone advise me on how to move from concept to code, please?
Thank you!
Posts: 6
Participants: 3