I need to keep everything local to the ESPHome. Your suggestion will certainly be an option, as will global variables.
I’m not stuck with this, though I don’t understand why there’s seemingly nothing in the docs to suggest that it won’t work and it validates and compiles and runs fine. It just doesn’t work!
And what is it about the last one that means it does work?
Using multiple pulse_meter makes the setting and resetting simpler, to my mind.
Did you ever work this out?
Ive got the same problem where only the last of a pulse_meter sensor send any values.
If for example, I have two and alternately comment out one of them, the other works, so I know the individual code is correct.
I suspect this may be the way its meant to operate, but cant find that its documented as such.
I tried to set up multiple sensors off one pin but it didn’t work. I sort of assumed, that I was asking too much; instead I used three “sensor: - Platform: template” to produce different mathematical calculations of the raw pulses that the pulse sensor produces. So my one sensor is producing four different numbers. My calculations were min/ max averages over different periods which is easy … if you were to count fixed period that might be a bit more tricky and probably need to set up a total from the sensor; with a reset as and when needed. And then a template with lambda formula. I am not expert but that is as far as I got
The output of the Template Sensor called “Wind_3s_Base” is picked up in HA and I run statistics to calculate moving window min/ max. ESPHome is not able to calculate moving min/ max (albeit it can do moving average) , hence why I shifted that out to HA.
In all I am calculating five different values from the pulse sensor.