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

Count based on binary_sensor into a template sensor?

$
0
0

@b03tz wrote:

Allright, I hope you guys can help me with this. I have set up a binary_sensor using a GPIO pin:

  - platform: rpi_gpio
    ports:
      5: Water meter

Now what this does is, everytime 1 liter of water is used it goes On and then Off again. Currently what I did is create a counter and have an automation increase the counter by 1 everytime the sensor is triggered from Off to On.

I bet there’s a much better way because I would like this as a numeric sensor. So that I can plot graphs of the water usage and such. I have looked into the template sensor but I feel like I am missing something very simple.

Can any of you guys help me out?

Posts: 8

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles