Hello, how to write code to measure pulses on a geiger counter using esphome.
the power supply of the Geiger counter is connected to the ON/OFF switch.
This means that when I turn on the geiger for 1 minute, I want to know the number of cpm after one minute.
And then the power goes off again for 10 minutes.
Can you help me how to write the code for pulse_counter?
well thank you
There is counter helper already provided in HA, so no need to write some code, but I think that reading will not be accurate in this way. Geiger counter need some time to ‘warm up’ after powering on and this time will affect the result. Maybe is better to leave counter povered and write automation which resets counter helper to zero, waits minute, and ‘publish’ value after the minute.
I think it will help me to set the pulse counter update interval to 1 second
And reset the total count every time you start measuring
and publish the value from the total count after one minute of measurement