airgradient_esphome icon indicating copy to clipboard operation
airgradient_esphome copied to clipboard

NowCast reading doesn't change over to ready when countdown reaches zero

Open ex-nerd opened this issue 1 year ago • 1 comments

There appears to still be an issue with the NowCast (and probably AQI) calculations not showing data even when the calculation reaches zero. This looks like a rounding error or order of operations issue within the internal async loop because it does seem to clear up within an hour of reaching zero.

I'll try to find some time this weekend to poke at the code and find out what's going on, and submit a PR. Hopefully it just needs something to trigger the calculations as soon as the timer reacher zero so it doesn't leave the user confused why the countdown stays at zero for an hour.

ex-nerd avatar May 24 '24 22:05 ex-nerd

Thanks. I'll keep an eye out for a PR.

If an order of operations, I wonder if changing the 1h interval that starts the scripts should be changed to something like 61 minutes so they don't overlap much. It would drift more over time, but might be something to consider.

MallocArray avatar May 24 '24 23:05 MallocArray