Sorry if this is in wrong forum, i really do not know what is right place to ask…
I installed “home assistant glow” node in my electricity meter today. On high loads measurements seems to be “spikey”, picture attached below. Measurements are between 13139W and 13091W.
My energy meter has 1000 pulses/kWh, and i calculated that 19139W gives pulses every 273,9934546ms and 13091W in 274,9980903ms.
It seems that pulse_meter_sensor has resolution of about 1ms.
I am not coder, but in github esphome i found that
pulse_meter_sensor.cpp
has this code:
// We quantize our pulse widths to 1 ms to avoid unnecessary jitter
const uint32_t pulse_width_ms = this->pulse_width_us_ / 1000;
if (this->pulse_width_dedupe_.next(pulse_width_ms)) {
if (pulse_width_ms == 0) {
// Treat 0 pulse width as 0 pulses/min (normally because we've not detected any pulses for a while)
this->publish_state(0);
} else {
// Calculate pulses/min from the pulse width in ms
this->publish_state((60.0f * 1000.0f) / pulse_width_ms);
Is there reason for reducing resolution? And how could i test changing that for example to 100us?