Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 96121

Create boolean sensor based on other sensor output

$
0
0

@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

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>