hi!
check out this photo - the clock-dial-looking disc in the right part of the meter is the silver-metal rotating-thing I was talking about the black part blocks light from TCRT5000.
about the pulses used in the “counter” setting.
I was able to calibrate the sensor - as you can see, it has a little screw on it - to react appropriately to the spinning disc, but even then it’s reaction is [as far as I’ve noticed] based not only on “light interruption” but also on “time of the interruption/reflection”. I know that there’re debounce settings in tasmota, which might help a little, but unfortunately I think that I cannot bypass this incosistency while metering. not with my knowledge at least [I’m mostly a copy-paste programmer ;)]. if it would be something like yours 221-228 pulses, I’d be happy to use it, it would be almost perfect to estimate.
now about my “workaround”.
I figured it out, that if “counter” combines pulse and time; while the “switch” uses only two states - then maybe it’s the way to go. sure, with faster flow the ON/OFF are not very “real time” but I noticed, that somehow they are queued and seems like tasmota shows them all, but with the slight delay [understandable for me]. I know, that I could use HomeAssistant to count these ON/OFFS and make a counter inside HA, but that would double the delay IMO: sensor->tasmota->mqtt->homeassistant. too many places that could fail.
if I combine it on the tasmota side only I’m not only cutting off those additional parts from the equation, but also I have an opportunity to save the counter into “ESP’s memory” to keep it safe in case of some network/power issues [well, I mean: I’m wondering theorethically, something similar popped up somewhere on the tasmota website].
of course: I can be soooo wrong with my plan, but right now it’s all I’ve got
today after work I’ll probably start to read more about tasmota rules, so I could build a proper one and test my theory in real world. I am aware, that this method could be also very buggy or it would introduce couple of other problems/delays/inconsistencies - but like I wrote - it’s all that my partial knowledge could cook right now