Hi!
I’ve got a traditional gas meter.
Fortunately it emits a magnetic field each time the smallest digit makes one turn.
So I gave a QMC5883L Magnetometer a try and the digit “2” on the meter is always seen as a nice >= 270 µT peak in a reliable manner.
Now I hope to get it working as a pulse counter:
Each time I get a “>= 270 µT” value I’d like to have it as a pulse.
It’s like the esphome Pulse Meter Sensor without the “pin”.
I think something like this should switch on GPIO5 when it’s above 270.
Then in Home Assistant you could add a history stats sensor to count the number of times the switch is on.
It could probably be done in ESP-Home also but not sure about if the counter can be saved past a restart and such.