Can’t get my brain around this… My statistics sensor shows state ‘unknown’ a few minutes after the source sensor hits zero and stays there. The statistics sensor should remain at 0 imho. Instead it turns ‘unknown’.
Tried both with and without max_age. Doesn’t seem to make a difference. Right now, the count stays at 0 and state remains unknown. The statistics sensor doesn’t seem to pick up the state changes, not even when I change the state around manually.
Using Development Tools > Service input_number.set_value - I changed the number 5x with some random integers.
Resulting in: state ‘unknown’ and count remains at 0.
I have a luminance sensor connected via Zigbee2mqtt that is having this “unknown” state problem. I’m not sure where and in what file your parameter needs to be added.
For me, because my sensor entity (wind speed) was coming from RTL433, the force_update setting was configured in the RTL433 Auto Discovery add-on. I’m not sure if you can configure this for Zigbee2MQTT. I checked for you, but I don’t see an option right away.