esphome / esphome/feature-requests

Binary sensor as input for pulse meter sensor

Open
#1,923 1 comment 4 reactions 0 assignees View on GitHub
component: pulse_meter
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**

I want to measure pulses that arrive on an analog_threshold binary sensor. The pulse meter sensor would be the best fit, but it only allows measurement of pulses that arrive on a GPIO pin. I would like to either programatically invoke a pulse on an existing pulse meter sensor (as action following the event whenever the binary sensor flips), or allow to set up a pulse meter sensor based on a binary sensor.

**Please describe your use case for this integration and alternatives you've tried:**

I have built a water meter based on a TCRT5000, but the digital output of the sensor is very unreliable. It creates many false pulses. I therefore read the analog output of the TCRT5000 and have created a treshold binary sensor out of it. That works very reliably for sensoring the relevant pulses. However, I have found no way to use that sensor in a pulse meter. The only option I currently see is a hardware mod in which I put a GPIO output pin to high whenever the binary sensor flips, connect the pin physically to another pin on the board and read that other pin with the pulse meter sensor component. ugh.

**Additional context**
Easiest solution to implement is propably to add a new action to the pulse meter sensor, that allows simulating a pulse.

Contributor guide

No contributing guide indexed for this repository

Research direction

The request names the pulse meter sensor, GPIO input, and analog-threshold binary sensor but no files or tests. Start by locating those component implementations and their event or action interfaces; decide whether binary-sensor pulses or a callable pulse action is the supported behavior, then define tests showing reliable pulse counting.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.